1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-09-28 15:01:21 +02:00

39578: Test more ERR_RETURN cases with "&&" and functions

This commit is contained in:
Peter Stephenson 2016-10-06 09:48:48 +01:00
parent bcb52460f3
commit ffa6c76253
2 changed files with 35 additions and 0 deletions

@ -1,3 +1,8 @@
2016-10-06 Peter Stephenson <p.stephenson@samsung.com>
* 39578: Test/C03traps.ztst: Test some more ERR_RETURN cases
involving "&&" and functions.
2016-10-05 Peter Stephenson <p.stephenson@samsung.com>
* 39571: Src/exec.c, Test/C03traps.ztst: "&&" inside a shell

@ -594,6 +594,36 @@ F:Must be tested with a top-level script rather than source or function
)
1:ERR_RETURN with "&&" in function (regression test)
>before-out
>before-in
(setopt err_return
fn() {
print before-in
false && false
print after-in
}
print before-out
fn
print after-out
)
0:ERR_RETURN not triggered on LHS of "&&" in function
>before-out
>before-in
>after-in
>after-out
(setopt err_return
fn() {
print before-in
true && false
print after-in
}
print before-out
fn
print after-out
)
1:ERR_RETURN triggered on RHS of "&&" in function
>before-out
>before-in
%clean