summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/regexp/lastIndex-too-large.js
blob: 3e04042dd02aefa8c37cc287da5e9c771517883e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
function test() {
    var re = /abc.+de/y;
    for (var i = 0; i < 100; i++) {
        re.lastIndex = 10;
        assertEq(re.exec("abcXdef"), null);
        assertEq(re.lastIndex, 0);

        re.lastIndex = 10;
        assertEq(re.test("abcXdef"), false);
        assertEq(re.lastIndex, 0);
    }
}
test();