aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/compress/dead-code.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/compress/dead-code.js b/test/compress/dead-code.js
index 5a7be3c7..a1fb9483 100644
--- a/test/compress/dead-code.js
+++ b/test/compress/dead-code.js
@@ -1151,3 +1151,20 @@ issue_3830_6: {
}
expect_stdout: "PASS"
}
+
+redundant_assignments: {
+ options = {
+ dead_code: true,
+ }
+ input: {
+ var a = a = "PASS", b = "FAIL";
+ b = b = "PASS";
+ console.log(a, b);
+ }
+ expect: {
+ var a = "PASS", b = "FAIL";
+ b = "PASS";
+ console.log(a, b);
+ }
+ expect_stdout: "PASS PASS"
+}