aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2020-01-28 02:04:44 +0800
committerGitHub <noreply@github.com>2020-01-28 02:04:44 +0800
commit0dcedad2d5a6b670ecd5aef3cf18d5e511af6e91 (patch)
tree4ebdc0ef0fa3e9590377ddc20c54e01086ff9a3e /test
parent36a430cd1e4a838602adace6f3321496992687c6 (diff)
downloadtracifyjs-0dcedad2d5a6b670ecd5aef3cf18d5e511af6e91.tar.gz
tracifyjs-0dcedad2d5a6b670ecd5aef3cf18d5e511af6e91.zip
fix corner case in `booleans` (#3691)
fixes #3690
Diffstat (limited to 'test')
-rw-r--r--test/compress/booleans.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/compress/booleans.js b/test/compress/booleans.js
index e1fa1a4f..6e7988bf 100644
--- a/test/compress/booleans.js
+++ b/test/compress/booleans.js
@@ -131,3 +131,25 @@ issue_3658: {
}
expect_stdout: "PASS"
}
+
+issue_3690: {
+ options = {
+ booleans: true,
+ unused: true,
+ }
+ input: {
+ console.log(function(a) {
+ return function() {
+ return a = [ this ];
+ }() ? "PASS" : "FAIL";
+ }());
+ }
+ expect: {
+ console.log(function(a) {
+ return function() {
+ return 1;
+ }() ? "PASS" : "FAIL";
+ }());
+ }
+ expect_stdout: "PASS"
+}