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

Unified Diff: test/mjsunit/harmony/regexp-lookbehind.js

Issue 1522353002: [regexp] break recursion in mutually recursive capture/back references. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: new test expectations Created 5 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/cctest/test-regexp.cc ('k') | test/mjsunit/regexp.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/regexp-lookbehind.js
diff --git a/test/mjsunit/harmony/regexp-lookbehind.js b/test/mjsunit/harmony/regexp-lookbehind.js
index 362ac4d9b4f4f5fbeea18374f1807eec745d29ed..515592989260495fe0e70559565eaefc8e1874e9 100644
--- a/test/mjsunit/harmony/regexp-lookbehind.js
+++ b/test/mjsunit/harmony/regexp-lookbehind.js
@@ -157,3 +157,9 @@ assertEquals(["abc", "abc"], /(abc\1)/i.exec("abc\u1234"));
var oob_subject = "abcdefghijklmnabcdefghijklmn".substr(14);
assertNull(oob_subject.match(/(?=(abcdefghijklmn))(?<=\1)a/i));
assertNull(oob_subject.match(/(?=(abcdefghijklmn))(?<=\1)a/));
+
+// Mutual recursive capture/back references
+assertEquals(["cacb", "a", ""], /(?<=a(.\2)b(\1)).{4}/.exec("aabcacbc"));
+assertEquals(["b", "ac", "ac"], /(?<=a(\2)b(..\1))b/.exec("aacbacb"));
+assertEquals(["x", "aa"], /(?<=(?:\1b)(aa))./.exec("aabaax"));
+assertEquals(["x", "aa"], /(?<=(?:\1|b)(aa))./.exec("aaaax"));
« no previous file with comments | « test/cctest/test-regexp.cc ('k') | test/mjsunit/regexp.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698