about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--Test/C03traps.ztst14
2 files changed, 18 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 810d06557..82c87fe19 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-08-06  Peter Stephenson  <pws@csr.com>
+
+	* 25400: Test/C03traps.ztst: Rocky's test for 25385
+
 2008-08-05  Peter Stephenson  <pws@csr.com>
 
 	* 25392: Test/C03traps.ztst: test for 25367
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