Index: test/mjsunit/harmony/regexp-named-captures.js |
diff --git a/test/mjsunit/harmony/regexp-named-captures.js b/test/mjsunit/harmony/regexp-named-captures.js |
index d5274fe094c3d4e071a5408c7d6e6195c6f66c01..ced8e4b2f6ba330698f43bbcad1a5a7afc72c82c 100644 |
--- a/test/mjsunit/harmony/regexp-named-captures.js |
+++ b/test/mjsunit/harmony/regexp-named-captures.js |
@@ -18,15 +18,15 @@ |
assertThrows("/\\k<a>(?<ab>a)/u"); // Invalid reference. |
// Fallback behavior in non-unicode mode. |
-assertThrows("/(?<>a)/", SyntaxError); |
-assertThrows("/(?<aa)/", SyntaxError); |
-assertThrows("/(?<42a>a)/", SyntaxError); |
-assertThrows("/(?<:a>a)/", SyntaxError); |
-assertThrows("/(?<a:>a)/", SyntaxError); |
-assertThrows("/(?<a>a)(?<a>a)/", SyntaxError); |
-assertThrows("/(?<a>a)(?<b>b)(?<a>a)/", SyntaxError); |
-assertThrows("/(?<a>a)\\k<ab>/", SyntaxError); |
-assertThrows("/(?<ab>a)\\k<a>/", SyntaxError); |
+assertThrows("/(?<>a)/"); |
+assertThrows("/(?<aa)/"); |
+assertThrows("/(?<42a>a)/"); |
+assertThrows("/(?<:a>a)/"); |
+assertThrows("/(?<a:>a)/"); |
+assertThrows("/(?<a>a)(?<a>a)/"); |
+assertThrows("/(?<a>a)(?<b>b)(?<a>a)/"); |
+assertThrows("/(?<a>a)\\k<ab>/"); |
+assertThrows("/(?<ab>a)\\k<a>/"); |
assertEquals(["k<a>"], "xxxk<a>xxx".match(/\k<a>/)); |
assertEquals(["k<a"], "xxxk<a>xxx".match(/\k<a/)); |
@@ -74,29 +74,3 @@ |
// Reference before group. |
assertEquals(["bab", "b"], "bab".match(/\k<a>(?<a>b)\w\k<a>/u)); |
assertEquals(["bab", "b", "a"], "bab".match(/(?<b>b)\k<a>(?<a>a)\k<b>/u)); |
- |
-// Reference properties. |
-assertEquals("a", /(?<a>a)(?<b>b)\k<a>/u.exec("aba").group.a); |
-assertEquals("b", /(?<a>a)(?<b>b)\k<a>/u.exec("aba").group.b); |
-assertEquals(undefined, /(?<a>a)(?<b>b)\k<a>/u.exec("aba").group.c); |
-assertFalse(/(?<a>a)(?<b>b)\k<a>/u.exec("aba").group.hasOwnProperty("c")); |
-assertEquals(undefined, /(?<a>a)(?<b>b)\k<a>|(?<c>c)/u.exec("aba").group.c); |
-assertTrue(/(?<a>a)(?<b>b)\k<a>|(?<c>c)/u |
- .exec("aba").group.hasOwnProperty("c")); |
- |
-// Unicode names. |
-assertEquals("a", /(?<π>a)/u.exec("bab").group.π); |
-assertEquals("a", /(?<\u{03C0}>a)/u.exec("bab").group.\u03C0); |
-assertEquals("a", /(?<$>a)/u.exec("bab").group.$); |
-assertEquals("a", /(?<_>a)/u.exec("bab").group._); |
-assertEquals("a", /(?<$𐒤>a)/u.exec("bab").group.$𐒤); |
-assertEquals("a", /(?<_\u200C>a)/u.exec("bab").group._\u200C); |
-assertEquals("a", /(?<_\u200D>a)/u.exec("bab").group._\u200D); |
-assertEquals("a", /(?<ಠ_ಠ>a)/u.exec("bab").group.ಠ_ಠ); |
-assertThrows('/(?<❤>a)/u', SyntaxError); |
-assertThrows('/(?<𐒤>a)/u', SyntaxError); // ID_Continue but not ID_Start. |
- |
-// Capture name conflicts. |
-assertThrows(() => /(?<__proto__>a)/u, SyntaxError); |
-assertEquals("a", /(?<__proto_>a)/u.exec("a").group.__proto_); |
-assertEquals("a", /(?<__proto___>a)/u.exec("a").group.__proto___); |