summaryrefslogtreecommitdiff
path: root/Test/C03traps.ztst
diff options
context:
space:
mode:
authorPhilippe Altherr <philippe.altherr@gmail.com>2022-12-03 21:03:36 -0800
committerBart Schaefer <schaefer@zsh.org>2022-12-03 21:03:36 -0800
commit259f1e944b96715fda25f7ba227da05bdb7e600f (patch)
tree277afcd503da942056b9bdfbd5f0b7089d961909 /Test/C03traps.ztst
parent28ac3e9fe5b68b517c477ad231966aaeed426085 (diff)
downloadzsh-259f1e944b96715fda25f7ba227da05bdb7e600f.tar.gz
zsh-259f1e944b96715fda25f7ba227da05bdb7e600f.zip
51071: fix ERR_RETURN for functions in conditional statements
Diffstat (limited to 'Test/C03traps.ztst')
-rw-r--r--Test/C03traps.ztst16
1 files changed, 16 insertions, 0 deletions
diff --git a/Test/C03traps.ztst b/Test/C03traps.ztst
index a8880673f..b7132da81 100644
--- a/Test/C03traps.ztst
+++ b/Test/C03traps.ztst
@@ -670,6 +670,22 @@ F:Must be tested with a top-level script rather than source or function
>before-out
>before-in
+ (set -o err_return
+ fn() {
+ print before-in
+ { false; true } && true
+ print after-in
+ }
+ print before-out
+ fn && true
+ print after-out
+ )
+0:ERR_RETURN not triggered on LHS of "&&" in function on LHS of "&&" (regression test)
+>before-out
+>before-in
+>after-in
+>after-out
+
mkdir -p zdotdir
print >zdotdir/.zshenv '
setopt norcs errreturn