diff options
Diffstat (limited to 'Test')
-rw-r--r-- | Test/C03traps.ztst | 36 |
1 files changed, 29 insertions, 7 deletions
diff --git a/Test/C03traps.ztst b/Test/C03traps.ztst index a7a040d70..4719dfd57 100644 --- a/Test/C03traps.ztst +++ b/Test/C03traps.ztst @@ -721,22 +721,19 @@ F:Must be tested with a top-level script rather than source or function >Good (setopt err_exit - for x in y; do - false && true - done + false && true print OK ) -0:ERR_EXIT not triggered by status 1 at end of for +0:ERR_EXIT not triggered by "false && true" >OK (setopt err_exit - integer x=0 - while (( ! x++ )); do + for x in y; do false && true done print OK ) -0:ERR_EXIT not triggered by status 1 at end of while +0:ERR_EXIT not triggered by status 1 at end of for >OK (setopt err_exit @@ -758,6 +755,31 @@ F:Must be tested with a top-level script rather than source or function >OK (setopt err_exit + loop=true + while print COND; $loop; do + loop=false + false && true + done + print OK + ) +0:ERR_EXIT not triggered by status 1 at end of while +>COND +>COND +>OK + + (setopt err_exit + { + false && true + } always { + print ALWAYS + } + print OK + ) +0:ERR_EXIT not triggered by status 1 at end of always +>ALWAYS +>OK + + (setopt err_exit { false && true } |