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

Unified Diff: test/mjsunit/regexp.js

Issue 13168: Moved regexp-tests that fail on JSCRE to separate file, and made it PASS || FAIL. (Closed)
Patch Set: Created 12 years 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/regexp-UC16.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regexp.js
diff --git a/test/mjsunit/regexp.js b/test/mjsunit/regexp.js
index bbf25dc409d506a80eb9436913141e081374fc4e..0ed72e6cf5aff2c53894ce5040f73cf419ac7519 100644
--- a/test/mjsunit/regexp.js
+++ b/test/mjsunit/regexp.js
@@ -265,17 +265,17 @@ assertTrue(/f(o)\B\1/.test('foo'));
// Back-reference, ignore case:
// ASCII
-assertEquals("xaAx,a", String(/x(a)\1x/i.exec("xaAx")), "\\1 ASCII");
-assertFalse(/x(...)\1/i.test("xaaaaa"), "\\1 ASCII, string short");
-assertTrue(/x((?:))\1\1x/i.test("xx"), "\\1 empty, ASCII");
-assertTrue(/x(?:...|(...))\1x/i.test("xabcx"), "\\1 uncaptured, ASCII");
-assertTrue(/x(?:...|(...))\1x/i.test("xabcABCx"), "\\1 backtrack, ASCII");
+assertEquals("xaAx,a", String(/x(a)\1x/i.exec("xaAx")), "backref-ASCII");
+assertFalse(/x(...)\1/i.test("xaaaaa"), "backref-ASCII-short");
+assertTrue(/x((?:))\1\1x/i.test("xx"), "backref-ASCII-empty");
+assertTrue(/x(?:...|(...))\1x/i.test("xabcx"), "backref-ASCII-uncaptured");
+assertTrue(/x(?:...|(...))\1x/i.test("xabcABCx"), "backref-ASCII-backtrack");
assertEquals("xaBcAbCABCx,aBc",
String(/x(...)\1\1x/i.exec("xaBcAbCABCx")),
- "\\1\\1 ASCII");
+ "backref-ASCII-twice");
for (var i = 0; i < 128; i++) {
- var testName = "(.)\\1 ~ " + i + "," + (i^0x20);
+ var testName = "backref-ASCII-char-" + i + "," + (i^0x20);
var test = /^(.)\1$/i.test(String.fromCharCode(i, i ^ 0x20))
var c = String.fromCharCode(i);
if (('A' <= c && c <= 'Z') || ('a' <= c && c <= 'z')) {
@@ -285,21 +285,4 @@ for (var i = 0; i < 128; i++) {
}
}
-// UC16
-// Characters used:
-// "\u03a3\u03c2\u03c3\u039b\u03bb" - Sigma, final sigma, sigma, Lambda, lamda
-assertEquals("x\u03a3\u03c3x,\u03a3",
- String(/x(.)\1x/i.exec("x\u03a3\u03c3x")), "\\1 UC16");
-assertFalse(/x(...)\1/i.test("x\u03a3\u03c2\u03c3\u03c2\u03c3"),
- "\\1 ASCII, string short");
-assertTrue(/\u03a3((?:))\1\1x/i.test("\u03c2x"), "\\1 empty, UC16");
-assertTrue(/x(?:...|(...))\1x/i.test("x\u03a3\u03c2\u03c3x"),
- "\\1 uncaptured, UC16");
-assertTrue(/x(?:...|(...))\1x/i.test("x\u03c2\u03c3\u039b\u03a3\u03c2\u03bbx"),
- "\\1 backtrack, UC16");
-var longUC16String = "x\u03a3\u03c2\u039b\u03c2\u03c3\u03bb\u03c3\u03a3\u03bb";
-assertEquals(longUC16String + "," + longUC16String.substring(1,4),
- String(/x(...)\1\1/i.exec(longUC16String)),
- "\\1\\1 UC16");
-
assertFalse(/f(o)$\1/.test('foo'), "backref detects at_end");
« no previous file with comments | « test/mjsunit/mjsunit.status ('k') | test/mjsunit/regexp-UC16.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698