1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-06-01 12:56:04 +02:00

25392: test for 25367

This commit is contained in:
Peter Stephenson 2008-08-05 08:41:22 +00:00
parent 541e5e2490
commit 21d757f50f
2 changed files with 42 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2008-08-05 Peter Stephenson <pws@csr.com>
* 25392: Test/C03traps.ztst: test for 25367
2008-08-04 Peter Stephenson <p.w.stephenson@ntlworld.com>
* Src/init.c: 25385: extend 25367 to fix another bug

View File

@ -350,6 +350,44 @@
>trap
>Working 0
debug-trap-bug1() {
setopt localtraps
print "print bug file here" >bug-file
print "print this is line one
print this is line two
print this is line three
print and this is line fifty-nine." >bug-file2
function debug_trap_handler {
print $functrace[1]
do_bug
}
function do_bug {
. ./bug-file
}
trap 'echo EXIT hit' EXIT
trap 'debug_trap_handler' DEBUG
. ./bug-file2
}
debug-trap-bug1
0: Relationship between traps and sources
>debug-trap-bug1:15
>bug file here
>this is line one
>./bug-file2:1
>bug file here
>this is line two
>./bug-file2:2
>bug file here
>this is line three
>./bug-file2:3
>bug file here
>and this is line fifty-nine.
>./bug-file2:4
>bug file here
>debug-trap-bug1:16
>bug file here
>EXIT hit
%clean
rm -f TRAPEXIT