summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/regexp-sticky-undef-capture.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/basic/regexp-sticky-undef-capture.js')
-rw-r--r--js/src/jit-test/tests/basic/regexp-sticky-undef-capture.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/regexp-sticky-undef-capture.js b/js/src/jit-test/tests/basic/regexp-sticky-undef-capture.js
new file mode 100644
index 000000000..3d96d4e44
--- /dev/null
+++ b/js/src/jit-test/tests/basic/regexp-sticky-undef-capture.js
@@ -0,0 +1,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);
+}