diff options
Diffstat (limited to 'js/src/jit-test/tests/basic/testStaticsInRegExp.js')
-rw-r--r-- | js/src/jit-test/tests/basic/testStaticsInRegExp.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/testStaticsInRegExp.js b/js/src/jit-test/tests/basic/testStaticsInRegExp.js new file mode 100644 index 000000000..16d869874 --- /dev/null +++ b/js/src/jit-test/tests/basic/testStaticsInRegExp.js @@ -0,0 +1,8 @@ +'abcdef'.replace(/a(\w+)c/, function() { + assertEq(RegExp.lastMatch, 'abc'); + '123456'.replace(/1(\d+)3/, function() { + assertEq(RegExp.lastMatch, '123'); + }); + assertEq(RegExp.lastMatch, '123'); +}); +assertEq(RegExp.lastMatch, '123'); |