aboutsummaryrefslogtreecommitdiff
path: root/tests/misc.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/misc.test')
-rw-r--r--tests/misc.test13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/misc.test b/tests/misc.test
index 6eeb648..29bd977 100644
--- a/tests/misc.test
+++ b/tests/misc.test
@@ -475,6 +475,19 @@ test jimexpr-2.5 "double ** operator" {
expr {$result in {unsupported 8.0}}
} 1
+test jimexpr-2.6 "exit in expression" {
+ # The inner 'exit 0' should propagate through the if to
+ # the outer catch
+ catch -exit {
+ set x 1
+ if {[catch {exit 0}] == 1} {
+ set x 2
+ } else {
+ set x 3
+ }
+ }]
+} 6
+
# This one is for test coverage of an unusual case
test jimobj-1.1 "duplicate obj with no dupIntRepProc" {
proc "x x" {} { return 2 }