aboutsummaryrefslogtreecommitdiff
path: root/test/compress/switches.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress/switches.js')
-rw-r--r--test/compress/switches.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/compress/switches.js b/test/compress/switches.js
index cbaa0644..af81b54c 100644
--- a/test/compress/switches.js
+++ b/test/compress/switches.js
@@ -1556,3 +1556,29 @@ issue_5008_4: {
}
expect_stdout: "PASS"
}
+
+issue_5010: {
+ options = {
+ dead_code: true,
+ evaluate: true,
+ switches: true,
+ }
+ input: {
+ var a;
+ switch (42) {
+ case console.log("PASS"):
+ case a:
+ console.log("FAIL");
+ case 42:
+ }
+ }
+ expect: {
+ var a;
+ switch (42) {
+ case console.log("PASS"):
+ case a:
+ console.log("FAIL");
+ }
+ }
+ expect_stdout: "PASS"
+}