about summary refs log tree commit diff
path: root/Test/C03traps.ztst
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-08-07 16:25:14 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-08-07 16:25:14 +0000
commit2706eac45492b0fcdfc3cf104ac947e65d09ee25 (patch)
treeff7f6e2a05231a8444589e54c95313114ebcae07 /Test/C03traps.ztst
parentc4f33330f6797d0c199abf522f79c3ccac88ed55 (diff)
downloadzsh-2706eac45492b0fcdfc3cf104ac947e65d09ee25.tar.gz
zsh-2706eac45492b0fcdfc3cf104ac947e65d09ee25.tar.xz
zsh-2706eac45492b0fcdfc3cf104ac947e65d09ee25.zip
25415: Make DEBUG_BEFORE_CMD the default.
Reuse ERR_EXIT in DEBUG traps.
Clean up trapreturn code.
Diffstat (limited to 'Test/C03traps.ztst')
-rw-r--r--Test/C03traps.ztst13
1 files changed, 13 insertions, 0 deletions
diff --git a/Test/C03traps.ztst b/Test/C03traps.ztst
index 79a30d773..b663e296f 100644
--- a/Test/C03traps.ztst
+++ b/Test/C03traps.ztst
@@ -402,6 +402,19 @@
 0: trapreturn handling bug is properly fixed
 ?./zsh-trapreturn-bug2:5: no such file or directory: ./fdasfsdafd
 
+  fn() {
+    setopt localtraps localoptions debugbeforecmd
+    trap '(( LINENO == 4 )) && setopt errexit' DEBUG
+    print $LINENO three
+    print $LINENO four
+    print $LINENO five
+    [[ -o errexit ]] && print "Hey, ERREXIT is set!"
+  }
+  fn
+1:Skip line from DEBUG trap
+>3 three
+>5 five
+
 %clean
 
   rm -f TRAPEXIT