aboutsummaryrefslogtreecommitdiff
path: root/test/compress
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2017-03-24 19:31:17 +0800
committerGitHub <noreply@github.com>2017-03-24 19:31:17 +0800
commitac51d4c5a079dccbc9a6cf69d06f757432c69694 (patch)
tree5f121ca645f1704ae3c3190249c04479cbd6e0a5 /test/compress
parent0432a7abb98f3aec871daa88331aa9223979dde3 (diff)
downloadtracifyjs-ac51d4c5a079dccbc9a6cf69d06f757432c69694.tar.gz
tracifyjs-ac51d4c5a079dccbc9a6cf69d06f757432c69694.zip
fix corner case in `AST_For.init` (#1652)
Enforce `null` as value for empty initialisation blocks. fixes #1648
Diffstat (limited to 'test/compress')
-rw-r--r--test/compress/loops.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/compress/loops.js b/test/compress/loops.js
index b55c6162..c8d77840 100644
--- a/test/compress/loops.js
+++ b/test/compress/loops.js
@@ -440,3 +440,21 @@ issue_186_beautify_bracketize_ie8: {
'}',
]
}
+
+issue_1648: {
+ options = {
+ join_vars: true,
+ loops: true,
+ passes: 2,
+ sequences: true,
+ unused: true,
+ }
+ input: {
+ function f() {
+ x();
+ var b = 1;
+ while (1);
+ }
+ }
+ expect_exact: "function f(){for(x();1;);}"
+}