summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testSlowNativeBail.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/basic/testSlowNativeBail.js')
-rw-r--r--js/src/jit-test/tests/basic/testSlowNativeBail.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/testSlowNativeBail.js b/js/src/jit-test/tests/basic/testSlowNativeBail.js
new file mode 100644
index 000000000..07def4543
--- /dev/null
+++ b/js/src/jit-test/tests/basic/testSlowNativeBail.js
@@ -0,0 +1,11 @@
+function testSlowNativeBail() {
+ var a = ['0', '1', '2', '3', '+'];
+ try {
+ for (var i = 0; i < a.length; i++)
+ new RegExp(a[i]);
+ assertEq(true, false);
+ } catch (exc) {
+ assertEq(exc instanceof SyntaxError, true);
+ }
+}
+testSlowNativeBail();