Index: test/cctest/test-parsing.cc |
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc |
index 287b61b02c27b9fbbc206fff4b74f5d6b2dce74a..00c91a4987ad36bf53daccd36409e76ae1eb8a94 100644 |
--- a/test/cctest/test-parsing.cc |
+++ b/test/cctest/test-parsing.cc |
@@ -9449,3 +9449,20 @@ TEST(NoPessimisticContextAllocation) { |
} |
} |
} |
+ |
+TEST(EscapedStrictReservedWord) { |
+ // Test that identifiers which are both escaped and only reserved in the |
+ // strict mode are accepted in non-strict mode. |
+ const char* context_data[][2] = {{"", ""}, {NULL, NULL}}; |
+ |
+ const char* statement_data[] = {"if (true) l\u0065t: ;", |
+ "function l\u0065t() { }", |
+ "(function l\u0065t() { })", |
+ "async function l\u0065t() { }", |
+ "(async function l\u0065t() { })", |
+ "l\u0065t => 42", |
+ "async l\u0065t => 42", |
+ NULL}; |
+ |
+ RunParserSyncTest(context_data, statement_data, kSuccess); |
+} |