Index: test/cctest/test-parsing.cc |
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc |
index c881f868a0472e146f611469d9b0ff30f34f7aa1..16139a56e5c51bf9d6aee12aff9a59a5aca333b1 100644 |
--- a/test/cctest/test-parsing.cc |
+++ b/test/cctest/test-parsing.cc |
@@ -7189,6 +7189,36 @@ TEST(MiscSyntaxErrors) { |
RunParserSyncTest(context_data, error_data, kError, NULL, 0, NULL, 0); |
} |
+ |
+TEST(EscapeSequenceErrors) { |
+ // clang-format off |
+ const char* context_data[][2] = { |
+ { "'", "'" }, |
+ { "\"", "\"" }, |
+ { "`", "`" }, |
+ { "`${'", "'}`" }, |
+ { "`${\"", "\"}`" }, |
+ { "`${`", "`}`" }, |
+ { "f(tag`", "`);" }, |
+ { NULL, NULL } |
+ }; |
+ const char* error_data[] = { |
+ "\\uABCG", |
+ "\\u{ZZ}", |
+ "\\u{FFZ}", |
+ "\\u{FFFFFFFFFF }", |
+ "\\u{110000}", |
+ "\\u{110000", |
+ "\\u{FFFD }", |
+ "\\xZF", |
+ NULL |
+ }; |
+ // clang-format on |
+ |
+ RunParserSyncTest(context_data, error_data, kError, NULL, 0, NULL, 0); |
+} |
+ |
+ |
TEST(FunctionSentErrors) { |
// clang-format off |
const char* context_data[][2] = { |