Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: Trap test cleanup
- X-seq: zsh-workers 21215
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: PATCH: Trap test cleanup
- Date: Sat, 30 Apr 2005 05:31:28 +0000
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
The test for autoloaded trap functions was leaving the TRAPEXIT file.
The other bit of this is just so we don't have the name of the zsh
executable hardwired in the test script. (There are some other test
scripts that could use this same trick.)
Index: C03traps.ztst
===================================================================
RCS file: /extra/cvsroot/zsh/zsh-4.0/Test/C03traps.ztst,v
retrieving revision 1.5
diff -c -r1.5 C03traps.ztst
--- C03traps.ztst 18 Feb 2005 17:05:19 -0000 1.5
+++ C03traps.ztst 30 Apr 2005 02:49:19 -0000
@@ -228,14 +228,14 @@
# Autoloaded traps are horrid, but unfortunately people expect
# them to work if we support them.
echo "print Running exit trap" >TRAPEXIT
- $ZTST_testdir/../Src/zsh -fc '
+ ${${ZTST_exe##[^/]*}:-$ZTST_testdir/$ZTST_exe} -fc '
fpath=(. $fpath)
autoload TRAPEXIT
print "Exiting, attempt 1"
exit
print "What?"
'
- $ZTST_testdir/../Src/zsh -fc '
+ ${${ZTST_exe##[^/]*}:-$ZTST_testdir/$ZTST_exe} -fc '
fpath=(. $fpath)
autoload TRAPEXIT;
fn() { print Some function }
@@ -249,3 +249,7 @@
>Some function
>Exiting, attempt 2
>Running exit trap
+
+%clean
+
+ rm -f TRAPEXIT
Messages sorted by:
Reverse Date,
Date,
Thread,
Author