From ffa6c76253b9833379893e87e8504eb03b4e954e Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 6 Oct 2016 09:48:48 +0100 Subject: 39578: Test more ERR_RETURN cases with "&&" and functions --- Test/C03traps.ztst | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'Test') diff --git a/Test/C03traps.ztst b/Test/C03traps.ztst index 5057dcf6e..74b83f33a 100644 --- a/Test/C03traps.ztst +++ b/Test/C03traps.ztst @@ -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 -- cgit 1.4.1