aboutsummaryrefslogtreecommitdiff
path: root/test/compress/issue-126.js
blob: 7a597b87cf8bd79bd603d193ee6f888bf0b21545 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
concatenate_rhs_strings: {
    options = {
        evaluate: true,
        unsafe: true,
    }
    input: {
        foo(bar() + 123 + "Hello" + "World");
        foo(bar() + (123 + "Hello") + "World");
        foo((bar() + 123) + "Hello" + "World");
        foo(bar() + 123 + "Hello" + "World" + ("Foo" + "Bar"));
        foo("Foo" + "Bar" + bar() + 123 + "Hello" + "World" + ("Foo" + "Bar"));
        foo("Hello" + bar() + 123 + "World");
        foo(bar() + 'Foo' + (10 + parseInt('10')));
    }
    expect: {
        foo(bar() + 123 + "HelloWorld");
        foo(bar() + "123HelloWorld");
        foo((bar() + 123) + "HelloWorld");
        foo(bar() + 123 + "HelloWorldFooBar");
        foo("FooBar" + bar() + "123HelloWorldFooBar");
        foo("Hello" + bar() + "123World");
        foo(bar() + 'Foo' + (10 + parseInt('10')));
    }
}