Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Unified Diff: test/mjsunit/harmony/templates.js

Issue 811113002: ES6 template literals should not use legacy octal strings (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/scanner.cc ('K') | « src/scanner.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/templates.js
diff --git a/test/mjsunit/harmony/templates.js b/test/mjsunit/harmony/templates.js
index 86caf453a5c998f7cb6f9cabdde145aba400ad2d..5350c64f0500cd40d300d4946d07811fba9bcf8f 100644
--- a/test/mjsunit/harmony/templates.js
+++ b/test/mjsunit/harmony/templates.js
@@ -471,3 +471,16 @@ var obj = {
// block
}`jkl`;
})();
+
+
+(function testLegacyOctal() {
+ assertEquals('0', `\0`);
caitp (gmail) 2014/12/17 17:04:21 Does this not basically make this U+0000 rather th
caitp (gmail) 2014/12/17 17:06:03 In SpiderMonkey, it is U+0000
arv (Not doing code reviews) 2014/12/17 17:56:20 Fixed.
+ assertEquals('01', `\01`);
+ assertEquals('012', `\012`);
+ assertEquals('123', `\123`);
+
+ assertEquals('\\0', String.raw`\0`);
+ assertEquals('\\01', String.raw`\01`);
+ assertEquals('\\012', String.raw`\012`);
+ assertEquals('\\123', String.raw`\123`);
+})();
« src/scanner.cc ('K') | « src/scanner.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698