diff options
Diffstat (limited to 'tests/misc.test')
-rw-r--r-- | tests/misc.test | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/misc.test b/tests/misc.test index 60dcf78..0ff2a7a 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 } @@ -550,7 +563,7 @@ test lmap-1.1 {lmap} { test exprerr-1.1 {Error message with bad expr} { catch {expr {5 ||}} msg set msg -} {Expression has bad operands to ||} +} {syntax error in expression "5 ||": premature end of expression} test eval-list-1.1 {Lost string rep with list} { set x {set y 1; incr y} |