Browse Source

testcase for a bug in String.prototype.replace()

pull/1/head
Sami Vaarala 12 years ago
parent
commit
7d081c453b
  1. 16
      testcases/test-dev-bug-string-replace-empty-match.js

16
testcases/test-dev-bug-string-replace-empty-match.js

@ -0,0 +1,16 @@
/*===
finished
foo
===*/
/* Empty match with a global RegExp caused an infinite loop. */
try {
var t = 'foo'.replace(/(?:)/g, '');
print('finished');
print(t);
} catch (e) {
print(e);
}
Loading…
Cancel
Save