diff options
author | Philippe Altherr <philippe.altherr@gmail.com> | 2022-12-03 21:03:36 -0800 |
---|---|---|
committer | Bart Schaefer <schaefer@zsh.org> | 2022-12-03 21:03:36 -0800 |
commit | 259f1e944b96715fda25f7ba227da05bdb7e600f (patch) | |
tree | 277afcd503da942056b9bdfbd5f0b7089d961909 /Test | |
parent | 28ac3e9fe5b68b517c477ad231966aaeed426085 (diff) | |
download | zsh-259f1e944b96715fda25f7ba227da05bdb7e600f.tar.gz zsh-259f1e944b96715fda25f7ba227da05bdb7e600f.zip |
51071: fix ERR_RETURN for functions in conditional statements
Diffstat (limited to 'Test')
-rw-r--r-- | Test/C03traps.ztst | 16 |
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 |