summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/regexp-reset-input.js
blob: 77cdd69dd639d772c88814226e07e2256b4ae165 (plain)
1
2
3
4
5
6
7
8
var re = /(pattern)/g;
var input = "patternpatternpattern";
re.exec(input)
RegExp.input = "satturn";
assertEq(RegExp.$1, "pattern");
assertEq(RegExp.lastMatch, "pattern");
assertEq(RegExp.lastParen, "pattern");
assertEq(RegExp.rightContext, "patternpattern");