diff options
| author | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2016-10-02 19:16:03 +0100 |
|---|---|---|
| committer | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2016-10-02 19:17:19 +0100 |
| commit | 6b2585147b842c69faecb136c17dbdda79b3e4b4 (patch) | |
| tree | d6fff6653a7773bf525482542f6ab4b420221083 /Test/C03traps.ztst | |
| parent | 39495: add-zle-hook-widget: Add end-of-options guard to hook invocation. (diff) | |
| download | zsh-6b2585147b842c69faecb136c17dbdda79b3e4b4.tar zsh-6b2585147b842c69faecb136c17dbdda79b3e4b4.tar.gz zsh-6b2585147b842c69faecb136c17dbdda79b3e4b4.tar.bz2 zsh-6b2585147b842c69faecb136c17dbdda79b3e4b4.tar.lz zsh-6b2585147b842c69faecb136c17dbdda79b3e4b4.tar.xz zsh-6b2585147b842c69faecb136c17dbdda79b3e4b4.tar.zst zsh-6b2585147b842c69faecb136c17dbdda79b3e4b4.zip | |
39540: "! command" should suppress ERR_EXIT and ERR_RETURN
Diffstat (limited to 'Test/C03traps.ztst')
| -rw-r--r-- | Test/C03traps.ztst | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/Test/C03traps.ztst b/Test/C03traps.ztst index 83c05aa08..3a65b2876 100644 --- a/Test/C03traps.ztst +++ b/Test/C03traps.ztst @@ -519,6 +519,43 @@ >Yes F:Must be tested with a top-level script rather than source or function + fn() { + emulate -L zsh + setopt errreturn + print before + false + print after + } + fn +1:ERRRETURN, basic case +>before + + fn() { + emulate -L zsh + setopt errreturn + print before + ! true + ! false + print after + } + fn +0:ERRETURN with "!" +>before +>after + + fn() { + emulate -L zsh + setopt errreturn + print before + ! true + ! false + false + print after + } + fn +1:ERRETURN with "!" and a following false +>before + %clean rm -f TRAPEXIT |
