aboutsummaryrefslogtreecommitdiff
path: root/test/compress/issue-44.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress/issue-44.js')
-rw-r--r--test/compress/issue-44.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/compress/issue-44.js b/test/compress/issue-44.js
new file mode 100644
index 00000000..7a972f9e
--- /dev/null
+++ b/test/compress/issue-44.js
@@ -0,0 +1,31 @@
+issue_44_valid_ast_1: {
+ options = { unused: true };
+ input: {
+ function a(b) {
+ for (var i = 0, e = b.qoo(); ; i++) {}
+ }
+ }
+ expect: {
+ function a(b) {
+ var i = 0;
+ for (b.qoo(); ; i++);
+ }
+ }
+}
+
+issue_44_valid_ast_2: {
+ options = { unused: true };
+ input: {
+ function a(b) {
+ if (foo) for (var i = 0, e = b.qoo(); ; i++) {}
+ }
+ }
+ expect: {
+ function a(b) {
+ if (foo) {
+ var i = 0;
+ for (b.qoo(); ; i++);
+ }
+ }
+ }
+}