aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/compress/reduce_vars.js21
-rw-r--r--test/ufuzz/index.js2
2 files changed, 22 insertions, 1 deletions
diff --git a/test/compress/reduce_vars.js b/test/compress/reduce_vars.js
index 67d473dd..ec75e911 100644
--- a/test/compress/reduce_vars.js
+++ b/test/compress/reduce_vars.js
@@ -7033,3 +7033,24 @@ issue_3844: {
}
expect_stdout: "undefined"
}
+
+issue_3866: {
+ options = {
+ dead_code: true,
+ evaluate: true,
+ reduce_vars: true,
+ }
+ input: {
+ console.log(function() {
+ {
+ return "PASS";
+ var a = 0;
+ }
+ return --a;
+ }());
+ }
+ expect: {
+ console.log("PASS");
+ }
+ expect_stdout: "PASS"
+}
diff --git a/test/ufuzz/index.js b/test/ufuzz/index.js
index 1a2163ed..616378cf 100644
--- a/test/ufuzz/index.js
+++ b/test/ufuzz/index.js
@@ -1181,7 +1181,7 @@ for (var round = 1; round <= num_iterations; round++) {
}
}
} else {
- uglify_code = uglify_code.error;
+ uglify_code = uglify_result = uglify_code.error;
ok = sandbox.same_stdout(original_result, uglify_result);
}
if (verbose || (verbose_interval && !(round % INTERVAL_COUNT)) || !ok) log(options);