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

Unified Diff: test/mjsunit/regexp.js

Issue 18842: Experimental: periodic merge of the bleeding_edge branch to the... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: Created 11 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
« no previous file with comments | « test/mjsunit/mjsunit.status ('k') | test/mjsunit/regress/regress-1081309.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regexp.js
===================================================================
--- test/mjsunit/regexp.js (revision 1168)
+++ test/mjsunit/regexp.js (working copy)
@@ -94,6 +94,22 @@
//assertTrue(/\c[a/]/.test( "\x1ba/]" ));
+// Test \c in character class
+re = /^[\cM]$/;
+assertTrue(re.test("\r"));
+assertFalse(re.test("M"));
+assertFalse(re.test("c"));
+assertFalse(re.test("\\"));
+assertFalse(re.test("\x03")); // I.e., read as \cc
+
+re = /^[\c]]$/;
+assertTrue(re.test("c]"));
+assertFalse(re.test("\\]"));
+assertFalse(re.test("\x1d")); // ']' & 0x1f
+assertFalse(re.test("\\]"));
+assertFalse(re.test("\x03]")); // I.e., read as \cc
+
+
// Test that we handle \s and \S correctly inside some bizarre
// character classes.
re = /[\s-:]/;
@@ -316,3 +332,7 @@
assertFalse(/()x\1y([0-7]%%%x|[0-6]%%%y)/.test('xy7%%%y'), 'qt6');
assertFalse(/xy([0-7]%%%x|[0-6]%%%y)/.test('xy7%%%y'), 'qt7');
assertFalse(/x([0-7]%%%x|[0-6]%%%y)/.test('x7%%%y'), 'qt8');
+
+
+// Don't hang on this one.
+/[^\xfe-\xff]*/.test("");
« no previous file with comments | « test/mjsunit/mjsunit.status ('k') | test/mjsunit/regress/regress-1081309.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698