public
/
UglifyJS.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
72844eb
)
add tests (#4122)
author
Alex Lam S.L
<alexlamsl@gmail.com>
Thu, 17 Sep 2020 16:26:31 +0000
(17:26 +0100)
committer
GitHub
<noreply@github.com>
Thu, 17 Sep 2020 16:26:31 +0000
(
00:26
+0800)
test/compress/concat-strings.js
patch
|
blob
|
history
diff --git
a/test/compress/concat-strings.js
b/test/compress/concat-strings.js
index
5e8c512
..
48b8d21
100644
(file)
--- a/
test/compress/concat-strings.js
+++ b/
test/compress/concat-strings.js
@@
-238,6
+238,41
@@
concat_8: {
expect_stdout: true
}
+concat_9: {
+ options = {
+ booleans: true,
+ evaluate: true,
+ reduce_vars: true,
+ strings: true,
+ toplevel: true,
+ }
+ input: {
+ var a = "foo";
+ console.log(
+ 12 + (34 + a),
+ null + (34 + a),
+ 12 + (null + a),
+ false + (34 + a),
+ 12 + (false + a),
+ "bar" + (34 + a),
+ 12 + ("bar" + a)
+ );
+ }
+ expect: {
+ var a = "foo";
+ console.log(
+ "1234" + a,
+ "null34" + a,
+ "12null" + a,
+ !1 + (34 + a),
+ 12 + (!1 + a),
+ "bar34" + a,
+ "12bar" + a
+ );
+ }
+ expect_stdout: true
+}
+
issue_3689: {
options = {
strings: true,