aboutsummaryrefslogtreecommitdiff
path: root/test/mocha/string-literal.js
diff options
context:
space:
mode:
authorRichard van Velzen <rvanvelzen@experty.com>2016-06-12 14:35:43 +0200
committerRichard van Velzen <rvanvelzen@experty.com>2016-06-12 14:35:43 +0200
commit9c53c7ada739ece69a9330811e5413a7da74a19b (patch)
tree9cb57e46deaf9817f076b59172ba6aed4bfc3499 /test/mocha/string-literal.js
parentf99b7b630daf85f85393d4508e2676456f2a3c4b (diff)
downloadtracifyjs-9c53c7ada739ece69a9330811e5413a7da74a19b.tar.gz
tracifyjs-9c53c7ada739ece69a9330811e5413a7da74a19b.zip
Fix octal string strict mode tests
Diffstat (limited to 'test/mocha/string-literal.js')
-rw-r--r--test/mocha/string-literal.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/mocha/string-literal.js b/test/mocha/string-literal.js
index c54c161c..b363a07f 100644
--- a/test/mocha/string-literal.js
+++ b/test/mocha/string-literal.js
@@ -60,10 +60,10 @@ describe("String literals", function() {
it("Should not throw error outside strict mode if string contains escaped octalIntegerLiteral", function() {
var tests = [
['"\\76";', '">";'],
- ['"\\0"', '"\\x00";'],
- ['"\\08"', '"\\x008";'],
- ['"\\008"', '"\\x008";'],
- ['"\\0008"', '"\\x008";'],
+ ['"\\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
];
@@ -75,7 +75,7 @@ describe("String literals", function() {
});
it("Should not throw error when digit is 8 or 9", function() {
- assert.equal(UglifyJS.parse('"use strict";"\\08"').print_to_string(), '"use strict";"\\x008";');
- assert.equal(UglifyJS.parse('"use strict";"\\09"').print_to_string(), '"use strict";"\\x009";');
+ assert.equal(UglifyJS.parse('"use strict";"\\08"').print_to_string(), '"use strict";"\\08";');
+ assert.equal(UglifyJS.parse('"use strict";"\\09"').print_to_string(), '"use strict";"\\09";');
});
-}); \ No newline at end of file
+});