From 0854ee56bc559d7fd614eb7d59b61da84a9ce51f Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Wed, 5 Oct 2016 13:52:31 +0100 Subject: 39568: "! " suppresses ERR_EXIT --- Test/C03traps.ztst | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'Test/C03traps.ztst') diff --git a/Test/C03traps.ztst b/Test/C03traps.ztst index 3a65b2876..0faec02e9 100644 --- a/Test/C03traps.ztst +++ b/Test/C03traps.ztst @@ -554,6 +554,33 @@ F:Must be tested with a top-level script rather than source or function } fn 1:ERRETURN with "!" and a following false +>before + + fn() { + emulate -L zsh + setopt errreturn + print before + ! if true; then + false + fi + print after + } + fn +0:ERRETURN with "!" suppressed inside complex structure +>before +>after + + fn() { + emulate -L zsh + setopt errreturn + print before + if true; then + false + fi + print after + } + fn +1:ERRETURN with no "!" suppression (control case) >before %clean -- cgit 1.4.1