summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/parser/regexp-after-do-while.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/parser/regexp-after-do-while.js')
-rw-r--r--js/src/jit-test/tests/parser/regexp-after-do-while.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/parser/regexp-after-do-while.js b/js/src/jit-test/tests/parser/regexp-after-do-while.js
new file mode 100644
index 0000000000..e94f8ac24d
--- /dev/null
+++ b/js/src/jit-test/tests/parser/regexp-after-do-while.js
@@ -0,0 +1,8 @@
+// RegExp after do-while get parsed.
+
+load(libdir + "asserts.js");
+
+assertNoWarning(() => Function("do {} while (true) \n /bar/g"), SyntaxError,
+ "RegExp in next line should be parsed");
+assertNoWarning(() => Function("do {} while (true) /bar/g"), SyntaxError,
+ "RegExp in same line should be parsed");