summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/regexp-sticky-undef-capture.js
blob: 3d96d4e44cc70060afb34b4b74e4213a3f8e96b4 (plain)
1
2
3
4
5
6
7
8
var re = /abc(WHOO!)?def/y;
var input = 'abcdefabcdefabcdef';
var count = 0;
while ((match = re.exec(input)) !== null) {
    print(count++);
    assertEq(match[0], 'abcdef');
    assertEq(match[1], undefined);
}