aboutsummaryrefslogtreecommitdiff
path: root/test/compress
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2019-03-20 14:54:26 +0800
committerGitHub <noreply@github.com>2019-03-20 14:54:26 +0800
commit143f9054da8790eee16758defdfdc927f48cf9b4 (patch)
tree6a81bf9bd0e4a9c944c0d96617a38173cdef4ab4 /test/compress
parentf2286c33f1245ba20f82a9429464c88c5c15b47f (diff)
downloadtracifyjs-143f9054da8790eee16758defdfdc927f48cf9b4.tar.gz
tracifyjs-143f9054da8790eee16758defdfdc927f48cf9b4.zip
fix corner case in `sequences` (#3350)
Diffstat (limited to 'test/compress')
-rw-r--r--test/compress/sequences.js30
1 files changed, 25 insertions, 5 deletions
diff --git a/test/compress/sequences.js b/test/compress/sequences.js
index 79b176e3..0670ab53 100644
--- a/test/compress/sequences.js
+++ b/test/compress/sequences.js
@@ -924,14 +924,14 @@ call: {
b.c = function() {
console.log(this === b ? "bar" : "baz");
},
- a, b(),
+ b(),
(a, b.c)(),
- a, function() {
+ function() {
console.log(this === a);
}(),
- a, new b(),
- a, new b.c(),
- a, new function() {
+ new b(),
+ new b.c(),
+ new function() {
console.log(this === a);
}();
}
@@ -944,3 +944,23 @@ call: {
"false",
]
}
+
+missing_link: {
+ options = {
+ conditionals: true,
+ evaluate: true,
+ sequences: true,
+ }
+ input: {
+ var a = 100;
+ a;
+ a++ + (0 ? 2 : 1);
+ console.log(a);
+ }
+ expect: {
+ var a = 100;
+ a,
+ a++,
+ console.log(a);
+ }
+}