Chromium Code Reviews| 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
|