From 2149bfb7071dedbcd42d2e245bb9c2f6b41a43bc Mon Sep 17 00:00:00 2001 From: Anthony Van de Gejuchte Date: Mon, 13 Jun 2016 21:11:08 +0200 Subject: 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 --- test/mocha/string-literal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/mocha/string-literal.js') 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) { -- cgit v1.2.3