diff options
author | Steve Bennett <steveb@workware.net.au> | 2020-05-01 11:11:49 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2020-05-06 08:18:11 +1000 |
commit | cc15115823f58221212ac42394243dc032732785 (patch) | |
tree | 644fcd5e4136f140d4e1c46fbdcc3991fcf1fdfc /tests/misc.test | |
parent | bda206b77afac4f73617df866a620b7c3b6f475d (diff) | |
download | jimtcl-cc15115823f58221212ac42394243dc032732785.zip jimtcl-cc15115823f58221212ac42394243dc032732785.tar.gz jimtcl-cc15115823f58221212ac42394243dc032732785.tar.bz2 |
exit: Set the exit code as the interp result
If exit is caught with catch -exit, it is currently not possible
to retrieve the exit value. If an exit code is provided, set it
as the interp result.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'tests/misc.test')
-rw-r--r-- | tests/misc.test | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/misc.test b/tests/misc.test index 14c6d71..cda7f57 100644 --- a/tests/misc.test +++ b/tests/misc.test @@ -288,8 +288,8 @@ test catch-1.6 "catch break" { test catch-1.7 "catch exit" { # Normally exit would not be caught - dict get [info returncodes] [catch -exit {exit 5} result] -} {exit} + list [dict get [info returncodes] [catch -exit {exit 5} result]] $result +} {exit 5} test catch-1.8 "catch error has -errorinfo" { set rc [catch {set undefined} msg opts] |