aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/compress/hoist_vars.js27
1 files changed, 26 insertions, 1 deletions
diff --git a/test/compress/hoist_vars.js b/test/compress/hoist_vars.js
index 4118f765..8db060df 100644
--- a/test/compress/hoist_vars.js
+++ b/test/compress/hoist_vars.js
@@ -140,7 +140,6 @@ issue_4487: {
functions: true,
hoist_vars: true,
keep_fnames: true,
- passes: 2,
reduce_vars: true,
toplevel: true,
unused: true,
@@ -240,3 +239,29 @@ issue_4736: {
}
expect_stdout: "1073741824"
}
+
+issue_4839: {
+ options = {
+ evaluate: true,
+ hoist_vars: true,
+ keep_fargs: false,
+ reduce_vars: true,
+ toplevel: true,
+ unused: true,
+ }
+ input: {
+ var o = function(a, b) {
+ return b && b;
+ }("foo");
+ for (var k in o)
+ throw "FAIL";
+ console.log("PASS");
+ }
+ expect: {
+ var k, o = void 0;
+ for (k in o)
+ throw "FAIL";
+ console.log("PASS");
+ }
+ expect_stdout: "PASS"
+}