summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/evaluate-catchTermination.js
blob: 6a9d3c74a79c8d1c0ce94b00a6c18fe80f062102 (plain)
1
2
3
4
5
6
// Test evaluate's catchTermination option.

var x = 0;
assertEq(evaluate('x = 1; terminate(); x = 2;', { catchTermination: true }),
         "terminated");
assertEq(x, 1);