summaryrefslogtreecommitdiff
path: root/Test/C03traps.ztst
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-08-06 08:54:18 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-08-06 08:54:18 +0000
commitb36d4eec0b6016d5968885d71034df51bce491e8 (patch)
treefa54219b2ebb258673954fee0fa6a7dfabcbcc96 /Test/C03traps.ztst
parent42471ac572cfb248dc46bb8ec928fecc80178d4a (diff)
downloadzsh-b36d4eec0b6016d5968885d71034df51bce491e8.tar.gz
zsh-b36d4eec0b6016d5968885d71034df51bce491e8.zip
25400: Rockys test for second part of trapreturn bug
Diffstat (limited to 'Test/C03traps.ztst')
-rw-r--r--Test/C03traps.ztst14
1 files changed, 14 insertions, 0 deletions
diff --git a/Test/C03traps.ztst b/Test/C03traps.ztst
index 92b17ce41..79a30d773 100644
--- a/Test/C03traps.ztst
+++ b/Test/C03traps.ztst
@@ -350,6 +350,7 @@
>trap
>Working 0
+ unsetopt DEBUG_BEFORE_CMD
debug-trap-bug1() {
setopt localtraps
print "print bug file here" >bug-file
@@ -388,6 +389,19 @@
>bug file here
>EXIT hit
+ cat >zsh-trapreturn-bug2 <<-'HERE'
+ cmd='./fdasfsdafd'
+ [[ -x $cmd ]] && rm $cmd
+ set -o DEBUG_BEFORE_CMD
+ trap '[[ $? -ne 0 ]] && exit 0' DEBUG
+ $cmd # invalid command
+ # Failure
+ exit 10
+ HERE
+ $ZTST_testdir/../Src/zsh -f ./zsh-trapreturn-bug2
+0: trapreturn handling bug is properly fixed
+?./zsh-trapreturn-bug2:5: no such file or directory: ./fdasfsdafd
+
%clean
rm -f TRAPEXIT