Add a unit test for issue-126
authorMark Jaquith <mark.github@txfx.net>
Fri, 25 Oct 2013 20:28:15 +0000 (16:28 -0400)
committerMark Jaquith <mark.github@txfx.net>
Fri, 25 Oct 2013 20:28:15 +0000 (16:28 -0400)
Add a unit test to test to test for aggressive parenthesis removal that causes functional changes.

test/compress/issue-126.js

index 1e65494..7a597b8 100644 (file)
@@ -10,6 +10,7 @@ concatenate_rhs_strings: {
         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");
@@ -18,5 +19,6 @@ concatenate_rhs_strings: {
         foo(bar() + 123 + "HelloWorldFooBar");
         foo("FooBar" + bar() + "123HelloWorldFooBar");
         foo("Hello" + bar() + "123World");
+        foo(bar() + 'Foo' + (10 + parseInt('10')));
     }
 }