mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-05 23:11:11 +02:00
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.
This commit is contained in:
parent
0d3a786b7c
commit
f19266cf99
2 changed files with 9 additions and 0 deletions
|
@ -1,5 +1,8 @@
|
||||||
2018-10-10 Peter Stephenson <p.stephenson@samsung.com>
|
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
|
* 43669: Src/builtin.c, Src/init.c, Test/C03traps.ztst: ensure
|
||||||
explicit exit status is used rather than implicit.
|
explicit exit status is used rather than implicit.
|
||||||
|
|
||||||
|
|
|
@ -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'
|
$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
|
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
|
%clean
|
||||||
|
|
||||||
rm -f TRAPEXIT
|
rm -f TRAPEXIT
|
||||||
|
|
Loading…
Reference in a new issue