summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/regexp-undefined-match.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/basic/regexp-undefined-match.js')
-rw-r--r--js/src/jit-test/tests/basic/regexp-undefined-match.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/regexp-undefined-match.js b/js/src/jit-test/tests/basic/regexp-undefined-match.js
new file mode 100644
index 0000000000..cf1d799833
--- /dev/null
+++ b/js/src/jit-test/tests/basic/regexp-undefined-match.js
@@ -0,0 +1,9 @@
+
+function f(str) {
+ for (var i=0; i<10; i++) {
+ arr = /foo(ba(r))?/.exec(str);
+ var x = arr[0] + " " + arr[1] + " " + arr[2];
+ }
+}
+f("foobar");
+f("foo");