aboutsummaryrefslogtreecommitdiff
path: root/test/compress/concat-strings.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2017-02-24 07:33:57 +0800
committerGitHub <noreply@github.com>2017-02-24 07:33:57 +0800
commit229e42cdee14c384b7a48bd0882bb27d98db040a (patch)
treeaefc78b2d7dded10d049296336324933596d770d /test/compress/concat-strings.js
parenteb55d8a9bb37cc28303ace91337784dbf0777d03 (diff)
parent4e49302916fe395f5c63992aa28c33392208fb27 (diff)
downloadtracifyjs-229e42cdee14c384b7a48bd0882bb27d98db040a.tar.gz
tracifyjs-229e42cdee14c384b7a48bd0882bb27d98db040a.zip
Merge pull request #1485 from alexlamsl/merge-2.8.0
2.8.0 staging
Diffstat (limited to 'test/compress/concat-strings.js')
-rw-r--r--test/compress/concat-strings.js140
1 files changed, 140 insertions, 0 deletions
diff --git a/test/compress/concat-strings.js b/test/compress/concat-strings.js
index 50eef8b8..d2503c6d 100644
--- a/test/compress/concat-strings.js
+++ b/test/compress/concat-strings.js
@@ -24,3 +24,143 @@ concat_1: {
var f = "\x00360\08\0";
}
}
+
+concat_2: {
+ options = {};
+ input: {
+ console.log(
+ 1 + (2 + 3),
+ 1 + (2 + "3"),
+ 1 + ("2" + 3),
+ 1 + ("2" + "3"),
+ "1" + (2 + 3),
+ "1" + (2 + "3"),
+ "1" + ("2" + 3),
+ "1" + ("2" + "3")
+ );
+ }
+ expect: {
+ console.log(
+ 1 + (2 + 3),
+ 1 + (2 + "3"),
+ 1 + "2" + 3,
+ 1 + "2" + "3",
+ "1" + (2 + 3),
+ "1" + 2 + "3",
+ "1" + "2" + 3,
+ "1" + "2" + "3"
+ );
+ }
+}
+
+concat_3: {
+ options = {};
+ input: {
+ console.log(
+ 1 + 2 + (3 + 4 + 5),
+ 1 + 2 + (3 + 4 + "5"),
+ 1 + 2 + (3 + "4" + 5),
+ 1 + 2 + (3 + "4" + "5"),
+ 1 + 2 + ("3" + 4 + 5),
+ 1 + 2 + ("3" + 4 + "5"),
+ 1 + 2 + ("3" + "4" + 5),
+ 1 + 2 + ("3" + "4" + "5")
+ );
+ }
+ expect: {
+ console.log(
+ 1 + 2 + (3 + 4 + 5),
+ 1 + 2 + (3 + 4 + "5"),
+ 1 + 2 + (3 + "4") + 5,
+ 1 + 2 + (3 + "4") + "5",
+ 1 + 2 + "3" + 4 + 5,
+ 1 + 2 + "3" + 4 + "5",
+ 1 + 2 + "3" + "4" + 5,
+ 1 + 2 + "3" + "4" + "5"
+ );
+ }
+}
+
+concat_4: {
+ options = {};
+ input: {
+ console.log(
+ 1 + "2" + (3 + 4 + 5),
+ 1 + "2" + (3 + 4 + "5"),
+ 1 + "2" + (3 + "4" + 5),
+ 1 + "2" + (3 + "4" + "5"),
+ 1 + "2" + ("3" + 4 + 5),
+ 1 + "2" + ("3" + 4 + "5"),
+ 1 + "2" + ("3" + "4" + 5),
+ 1 + "2" + ("3" + "4" + "5")
+ );
+ }
+ expect: {
+ console.log(
+ 1 + "2" + (3 + 4 + 5),
+ 1 + "2" + (3 + 4) + "5",
+ 1 + "2" + 3 + "4" + 5,
+ 1 + "2" + 3 + "4" + "5",
+ 1 + "2" + "3" + 4 + 5,
+ 1 + "2" + "3" + 4 + "5",
+ 1 + "2" + "3" + "4" + 5,
+ 1 + "2" + "3" + "4" + "5"
+ );
+ }
+}
+
+concat_5: {
+ options = {};
+ input: {
+ console.log(
+ "1" + 2 + (3 + 4 + 5),
+ "1" + 2 + (3 + 4 + "5"),
+ "1" + 2 + (3 + "4" + 5),
+ "1" + 2 + (3 + "4" + "5"),
+ "1" + 2 + ("3" + 4 + 5),
+ "1" + 2 + ("3" + 4 + "5"),
+ "1" + 2 + ("3" + "4" + 5),
+ "1" + 2 + ("3" + "4" + "5")
+ );
+ }
+ expect: {
+ console.log(
+ "1" + 2 + (3 + 4 + 5),
+ "1" + 2 + (3 + 4) + "5",
+ "1" + 2 + 3 + "4" + 5,
+ "1" + 2 + 3 + "4" + "5",
+ "1" + 2 + "3" + 4 + 5,
+ "1" + 2 + "3" + 4 + "5",
+ "1" + 2 + "3" + "4" + 5,
+ "1" + 2 + "3" + "4" + "5"
+ );
+ }
+}
+
+concat_6: {
+ options = {};
+ input: {
+ console.log(
+ "1" + "2" + (3 + 4 + 5),
+ "1" + "2" + (3 + 4 + "5"),
+ "1" + "2" + (3 + "4" + 5),
+ "1" + "2" + (3 + "4" + "5"),
+ "1" + "2" + ("3" + 4 + 5),
+ "1" + "2" + ("3" + 4 + "5"),
+ "1" + "2" + ("3" + "4" + 5),
+ "1" + "2" + ("3" + "4" + "5")
+ );
+ }
+ expect: {
+ console.log(
+ "1" + "2" + (3 + 4 + 5),
+ "1" + "2" + (3 + 4) + "5",
+ "1" + "2" + 3 + "4" + 5,
+ "1" + "2" + 3 + "4" + "5",
+ "1" + "2" + "3" + 4 + 5,
+ "1" + "2" + "3" + 4 + "5",
+ "1" + "2" + "3" + "4" + 5,
+ "1" + "2" + "3" + "4" + "5"
+ );
+ }
+}