summaryrefslogtreecommitdiff
path: root/js/src/jit-test/tests/basic/testStaticsInRegExp.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/basic/testStaticsInRegExp.js')
-rw-r--r--js/src/jit-test/tests/basic/testStaticsInRegExp.js9
1 files changed, 9 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 0000000..cef69cd
--- /dev/null
+++ b/js/src/jit-test/tests/basic/testStaticsInRegExp.js
@@ -0,0 +1,9 @@
+'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, 'abc');
+