diff options
author | Anthony Van de Gejuchte <anthonyvdgent@gmail.com> | 2016-06-13 21:11:08 +0200 |
---|---|---|
committer | Richard van Velzen <rvanvelzen1@gmail.com> | 2016-06-19 20:59:17 +0200 |
commit | 2149bfb7071dedbcd42d2e245bb9c2f6b41a43bc (patch) | |
tree | 0d389df29100365c26b97224ba436c5b0dbd222c /test/mocha/string-literal.js | |
parent | d7971ba0e439eb042fd880762bc7fa77ce1f3e73 (diff) | |
download | tracifyjs-2149bfb7071dedbcd42d2e245bb9c2f6b41a43bc.tar.gz tracifyjs-2149bfb7071dedbcd42d2e245bb9c2f6b41a43bc.zip |
Don't mix strings with directives in output
* Don't interpret strings with escaped content as directive
* Don't interpret strings after empty statement as directive
* Adapt output to prevent strings being represent as directive
* Introduce UGLIFY_DEBUG to allow internal testing like EXPECT_DIRECTIVE
Diffstat (limited to 'test/mocha/string-literal.js')
-rw-r--r-- | test/mocha/string-literal.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/mocha/string-literal.js b/test/mocha/string-literal.js index b363a07f..ea984213 100644 --- a/test/mocha/string-literal.js +++ b/test/mocha/string-literal.js @@ -59,13 +59,13 @@ describe("String literals", function() { it("Should not throw error outside strict mode if string contains escaped octalIntegerLiteral", function() { var tests = [ - ['"\\76";', '">";'], + ['"\\76";', ';">";'], ['"\\0"', '"\\0";'], ['"\\08"', '"\\08";'], ['"\\008"', '"\\08";'], ['"\\0008"', '"\\08";'], ['"use strict" === "use strict";\n"\\76";', '"use strict"==="use strict";">";'], - // ['"use\\\n strict";\n"\\07";', '"use\\\n strict";\n"\\u0007";'] // TODO No way to store this content literally yet as directive + ['"use\\\n strict";\n"\\07";', ';"use strict";"\07";'] ]; for (var test in tests) { |