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

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

Issue 6529032: Merge 6168:6800 from bleeding_edge to experimental/gc branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 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/cctest/test-strtod.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-regexp.cc
===================================================================
--- test/cctest/test-regexp.cc (revision 6800)
+++ test/cctest/test-regexp.cc (working copy)
@@ -176,11 +176,23 @@
CHECK_PARSE_EQ("[\\d-z]", "[0-9 - z]");
CHECK_PARSE_EQ("[\\d-\\d]", "[0-9 - 0-9]");
CHECK_PARSE_EQ("[z-\\d]", "[z - 0-9]");
+ // Control character outside character class.
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("\\c1", "'\\c1'");
+ // Control character inside character class.
+ CHECK_PARSE_EQ("[\\c!]", "[\\ c !]");
+ CHECK_PARSE_EQ("[\\c_]", "[\\x1f]");
+ CHECK_PARSE_EQ("[\\c~]", "[\\ c ~]");
+ CHECK_PARSE_EQ("[\\ca]", "[\\x01]");
+ CHECK_PARSE_EQ("[\\cz]", "[\\x1a]");
+ CHECK_PARSE_EQ("[\\cA]", "[\\x01]");
+ CHECK_PARSE_EQ("[\\cZ]", "[\\x1a]");
+ CHECK_PARSE_EQ("[\\c1]", "[\\x11]");
+
CHECK_PARSE_EQ("[a\\]c]", "[a ] c]");
CHECK_PARSE_EQ("\\[\\]\\{\\}\\(\\)\\%\\^\\#\\ ", "'[]{}()%^# '");
CHECK_PARSE_EQ("[\\[\\]\\{\\}\\(\\)\\%\\^\\#\\ ]", "[[ ] { } ( ) % ^ # ]");
@@ -234,7 +246,7 @@
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'");
CHECK_PARSE_EQ("\\u0034", "'\x34'");
CHECK_PARSE_EQ("\\u003z", "'u003z'");
CHECK_PARSE_EQ("foo[z]*", "(: 'foo' (# 0 - g [z]))");
« no previous file with comments | « test/cctest/test-parsing.cc ('k') | test/cctest/test-strtod.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698