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

Unified Diff: test/mjsunit/regexp-capture-3.js

Issue 10174017: Regexp: Remove nodes from the regexp that cannot match because (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 8 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
« src/jsregexp.cc ('K') | « src/jsregexp.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regexp-capture-3.js
===================================================================
--- test/mjsunit/regexp-capture-3.js (revision 11428)
+++ test/mjsunit/regexp-capture-3.js (working copy)
@@ -154,3 +154,9 @@
a = "foo bar baz".replace(/^|bar/g, "*");
assertEquals("*foo * baz", a);
+
+// A regexp that will backtrack forever. However it can never match
+// on an ASCII regexp because it has a forced non-ASCII character.
+// Test that we detect regexps that can never match on ASCII strings.
+var re = /(((.*)*)*)å/;
+"This is an ASCII string that could take forever".match(re);
ulan 2012/04/25 12:55:28 Could you please add more tests? At least one for
« src/jsregexp.cc ('K') | « src/jsregexp.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698