diff options
| author | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2017-04-27 18:56:18 +0100 |
|---|---|---|
| committer | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2017-04-27 18:56:18 +0100 |
| commit | d7110d8f01cae8c8d51c7abd0255f533cd8b8623 (patch) | |
| tree | 238931229fcf7831c7ff5f41212f9626167fbb63 /Test | |
| parent | 41016: Test that quoted precommand modifiers now work (diff) | |
| download | zsh-d7110d8f01cae8c8d51c7abd0255f533cd8b8623.tar zsh-d7110d8f01cae8c8d51c7abd0255f533cd8b8623.tar.gz zsh-d7110d8f01cae8c8d51c7abd0255f533cd8b8623.tar.bz2 zsh-d7110d8f01cae8c8d51c7abd0255f533cd8b8623.tar.lz zsh-d7110d8f01cae8c8d51c7abd0255f533cd8b8623.tar.xz zsh-d7110d8f01cae8c8d51c7abd0255f533cd8b8623.tar.zst zsh-d7110d8f01cae8c8d51c7abd0255f533cd8b8623.zip | |
41012: Fix premature exit from nested function in EXIT trap.
Also add check so we don't delay an exit if we were already in
an EXIT trap for the main shell, as we should in that case leave
immediately.
Diffstat (limited to 'Test')
| -rw-r--r-- | Test/C03traps.ztst | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Test/C03traps.ztst b/Test/C03traps.ztst index 7bc0b486d..759401225 100644 --- a/Test/C03traps.ztst +++ b/Test/C03traps.ztst @@ -756,6 +756,27 @@ F:Must be tested with a top-level script rather than source or function >'' >hello + $ZTST_testdir/../Src/zsh -f =(<<<" + trap handler EXIT + handler() { + echoa + echo b + } + echoa() { + echo a + } + exit0() { + exit + } + main() { + exit0 + } + main + ") +0:No early exit from nested function in EXIT trap. +>a +>b + %clean rm -f TRAPEXIT |
