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

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: Fix backslash 0 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
« no previous file with comments | « 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..90d975ac41c8a7dc1ab190e0380f3fe92ac4f332 100644
--- a/test/mjsunit/harmony/templates.js
+++ b/test/mjsunit/harmony/templates.js
@@ -471,3 +471,16 @@ var obj = {
// block
}`jkl`;
})();
+
+
+(function testLegacyOctal() {
+ assertEquals('\u0000', `\0`);
+ assertEquals('\u00001', `\01`);
+ assertEquals('\u000012', `\012`);
caitp (gmail) 2014/12/17 18:04:59 Few other things: "\0a" matches the grammar `Esca
+ assertEquals('123', `\123`);
+
+ assertEquals('\\0', String.raw`\0`);
+ assertEquals('\\01', String.raw`\01`);
+ assertEquals('\\012', String.raw`\012`);
+ assertEquals('\\123', String.raw`\123`);
+})();
« no previous file with comments | « src/scanner.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698