diff options
Diffstat (limited to 'Test/C03traps.ztst')
-rw-r--r-- | Test/C03traps.ztst | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Test/C03traps.ztst b/Test/C03traps.ztst index b663e296f..1e0b4088f 100644 --- a/Test/C03traps.ztst +++ b/Test/C03traps.ztst @@ -415,6 +415,20 @@ >3 three >5 five + # Assignments are a special case, since they use a simpler + # wordcode type, so we need to test skipping them separately. + fn() { + setopt localtraps localoptions debugbeforecmd + trap '(( LINENO == 4 )) && setopt errexit' DEBUG + x=three + x=four + print $LINENO $x + [[ -o errexit ]] && print "Hey, ERREXIT is set!" + } + fn +1:Skip assignment from DEBUG trap +>5 three + %clean rm -f TRAPEXIT |