diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2019-12-25 00:55:39 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-25 00:55:39 +0000 |
commit | ab050e7a9415b3d60d02a360becaa25b4a9ab2f1 (patch) | |
tree | 269a49aad5669795be2a46167b9289aa101fee91 /test/compress | |
parent | 75aa6ef8483e6ccde0999cd6d21e695d84703ac0 (diff) | |
download | tracifyjs-ab050e7a9415b3d60d02a360becaa25b4a9ab2f1.tar.gz tracifyjs-ab050e7a9415b3d60d02a360becaa25b4a9ab2f1.zip |
fix corner case in `directives` (#3645)
Diffstat (limited to 'test/compress')
-rw-r--r-- | test/compress/directives.js | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/test/compress/directives.js b/test/compress/directives.js index 590d1623..69ecfdc4 100644 --- a/test/compress/directives.js +++ b/test/compress/directives.js @@ -93,3 +93,41 @@ issue_3166: { } } } + +valid_after_invalid_1: { + input: { + console.log(typeof function() { + "use\x20strict"; + "use strict"; + return this; + }()); + } + expect: { + console.log(typeof function() { + "use\x20strict"; + "use strict"; + return this; + }()); + } + expect_stdout: "undefined" +} + +valid_after_invalid_2: { + options = { + directives: true, + } + input: { + console.log(typeof function() { + "use\x20strict"; + "use strict"; + return this; + }()); + } + expect: { + console.log(typeof function() { + "use strict"; + return this; + }()); + } + expect_stdout: "undefined" +} |