diff options
author | Peter Stephenson <p.stephenson@samsung.com> | 2018-10-10 12:11:27 +0100 |
---|---|---|
committer | Peter Stephenson <p.stephenson@samsung.com> | 2018-10-10 12:11:27 +0100 |
commit | f19266cf99f8a194add752a764bd5ea13ed215b2 (patch) | |
tree | e8b2d26a783986a31e0ab18836042db5ec8bcbb8 | |
parent | 0d3a786b7cff90868a586e5e3a491b82589a236d (diff) | |
download | zsh-f19266cf99f8a194add752a764bd5ea13ed215b2.tar.gz zsh-f19266cf99f8a194add752a764bd5ea13ed215b2.tar.xz zsh-f19266cf99f8a194add752a764bd5ea13ed215b2.zip |
unposted: another couple of tests for previous commit.
This tests different code paths as the -c command option exits in a different fashion from code executed from a script.
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | Test/C03traps.ztst | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog index 12cf3ebf2..ddcf717cc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2018-10-10 Peter Stephenson <p.stephenson@samsung.com> + * unposted: Test/C03traps.ztst: Another couple of tests for + other code paths. + * 43669: Src/builtin.c, Src/init.c, Test/C03traps.ztst: ensure explicit exit status is used rather than implicit. diff --git a/Test/C03traps.ztst b/Test/C03traps.ztst index 57daf8ddf..4aebd92b7 100644 --- a/Test/C03traps.ztst +++ b/Test/C03traps.ztst @@ -875,6 +875,12 @@ F:Must be tested with a top-level script rather than source or function $ZTST_testdir/../Src/zsh -fc 'fn() { exit 0; }; trap fn EXIT; false' 0:Explicit exit status 0 in exit trap overrides implicit non-zero status + $ZTST_testdir/../Src/zsh -f <<<'fn() { exit 13; }; trap fn EXIT; false' +13:Exit status from exit trap, script-like path + + $ZTST_testdir/../Src/zsh -f <<<'fn() { exit 0; }; trap fn EXIT; false' +0:Explicit exit status overrides implicit: script-like code path + %clean rm -f TRAPEXIT |