diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-09-17 17:26:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-18 00:26:31 +0800 |
commit | 7f501f9fedfb72faf7665cf223a313e9dbb30484 (patch) | |
tree | 4a0cac13655d2e5f14a219e4704269d50a6589ac /test/compress/concat-strings.js | |
parent | 72844eb5a4508d2e8fe43a4038983c382708d1e6 (diff) | |
download | tracifyjs-7f501f9fedfb72faf7665cf223a313e9dbb30484.tar.gz tracifyjs-7f501f9fedfb72faf7665cf223a313e9dbb30484.zip |
add tests (#4122)
Diffstat (limited to 'test/compress/concat-strings.js')
-rw-r--r-- | test/compress/concat-strings.js | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/test/compress/concat-strings.js b/test/compress/concat-strings.js index 5e8c512a..48b8d21c 100644 --- 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, |