blob: b6488ec678b806e99c4e856c266a4dd955a71f43 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
function test() {
var re = /abc.+de/;
var c = 0;
for (var i = 0; i < 100; i++) {
assertEq(re.test("abcXdef"), true);
if (i === 60) {
RegExp.prototype.exec = () => { c++; return {}; };
}
}
assertEq(c, 39);
}
test();
|