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

Unified Diff: test/cctest/test-regexp.cc

Issue 6171001: Change interpretation of malformed \c? escapes in RegExp to match JSC. (Closed)
Patch Set: Fix lint problem Created 9 years, 11 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
Index: test/cctest/test-regexp.cc
diff --git a/test/cctest/test-regexp.cc b/test/cctest/test-regexp.cc
index 3e6709aef43c47aea5da17f787558cc9755c1069..bd49ada2ba4e647c69d677278336b50f7192cbc2 100644
--- a/test/cctest/test-regexp.cc
+++ b/test/cctest/test-regexp.cc
@@ -178,9 +178,9 @@ TEST(Parser) {
CHECK_PARSE_EQ("[z-\\d]", "[z - 0-9]");
CHECK_PARSE_EQ("\\cj\\cJ\\ci\\cI\\ck\\cK",
"'\\x0a\\x0a\\x09\\x09\\x0b\\x0b'");
- CHECK_PARSE_EQ("\\c!", "'c!'");
- CHECK_PARSE_EQ("\\c_", "'c_'");
- CHECK_PARSE_EQ("\\c~", "'c~'");
+ CHECK_PARSE_EQ("\\c!", "'\\c!'");
+ CHECK_PARSE_EQ("\\c_", "'\\c_'");
+ CHECK_PARSE_EQ("\\c~", "'\\c~'");
CHECK_PARSE_EQ("[a\\]c]", "[a ] c]");
CHECK_PARSE_EQ("\\[\\]\\{\\}\\(\\)\\%\\^\\#\\ ", "'[]{}()%^# '");
CHECK_PARSE_EQ("[\\[\\]\\{\\}\\(\\)\\%\\^\\#\\ ]", "[[ ] { } ( ) % ^ # ]");
@@ -234,7 +234,7 @@ TEST(Parser) {
CHECK_PARSE_EQ("\\x34", "'\x34'");
CHECK_PARSE_EQ("\\x60", "'\x60'");
CHECK_PARSE_EQ("\\x3z", "'x3z'");
- CHECK_PARSE_EQ("\\c", "'c'");
+ CHECK_PARSE_EQ("\\c", "'\\c'");
Erik Corry 2011/01/07 10:38:16 Test of the JS parser as well as the regexp parser
Lasse Reichstein 2011/01/07 12:34:09 Added to cctest/test-parsing.cc
CHECK_PARSE_EQ("\\u0034", "'\x34'");
CHECK_PARSE_EQ("\\u003z", "'u003z'");
CHECK_PARSE_EQ("foo[z]*", "(: 'foo' (# 0 - g [z]))");

Powered by Google App Engine
This is Rietveld 408576698