diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2008-08-25 17:28:13 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2008-08-25 17:28:13 +0000 |
commit | b8ae885ab8252f37b149472c288cf0d1c812324d (patch) | |
tree | f1d75030d1aa3b205dab8d3d588aa828c85743e2 /Test | |
parent | 9d7298bac8c9c8930fa69e4bffa75fb6d0beb506 (diff) | |
download | zsh-b8ae885ab8252f37b149472c288cf0d1c812324d.tar.gz zsh-b8ae885ab8252f37b149472c288cf0d1c812324d.tar.xz zsh-b8ae885ab8252f37b149472c288cf0d1c812324d.zip |
25532: problem skipping assignments etc. with setopt ERREXIT
Diffstat (limited to 'Test')
-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 |