1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-06-06 23:36:03 +02:00

25400: Rockys test for second part of trapreturn bug

This commit is contained in:
Peter Stephenson 2008-08-06 08:54:18 +00:00
parent 42471ac572
commit b36d4eec0b
2 changed files with 18 additions and 0 deletions

View File

@ -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

View File

@ -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