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

Unified Diff: test/mjsunit/compiler/literals.js

Issue 2665513002: [parser] Lift template literal invalid escape restriction (Closed)
Patch Set: reintroduce DCHECK_EQ Created 3 years, 10 months 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 | « test/cctest/test-parsing.cc ('k') | test/mjsunit/harmony/template-escapes.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/compiler/literals.js
diff --git a/test/mjsunit/compiler/literals.js b/test/mjsunit/compiler/literals.js
index 3bda9fc47235329ab3f7cf5702f9b99cb59859c3..49de2e10f23e709b41986e93f9ea8bdc85b00fa7 100644
--- a/test/mjsunit/compiler/literals.js
+++ b/test/mjsunit/compiler/literals.js
@@ -71,6 +71,10 @@ assertThrows('"\\u111G"');
assertEquals("\\x1G", /\x1G/.source);
assertEquals("\\u111G", /\u111G/.source);
+// Test that octal literals continue to be forbidden in template even
+// when followed by a string containing an octal literal.
+assertThrows('`\\1`\n"\\1"');
+
// Test some materialized array literals.
assertEquals([1,2,3,4], eval('[1,2,3,4]'));
assertEquals([[1,2],3,4], eval('[[1,2],3,4]'));
« no previous file with comments | « test/cctest/test-parsing.cc ('k') | test/mjsunit/harmony/template-escapes.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698