summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/evaluate-catchTermination.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/basic/evaluate-catchTermination.js')
-rw-r--r--js/src/jit-test/tests/basic/evaluate-catchTermination.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/evaluate-catchTermination.js b/js/src/jit-test/tests/basic/evaluate-catchTermination.js
new file mode 100644
index 0000000000..6a9d3c74a7
--- /dev/null
+++ b/js/src/jit-test/tests/basic/evaluate-catchTermination.js
@@ -0,0 +1,6 @@
+// Test evaluate's catchTermination option.
+
+var x = 0;
+assertEq(evaluate('x = 1; terminate(); x = 2;', { catchTermination: true }),
+ "terminated");
+assertEq(x, 1);