about summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2004-07-26 13:18:07 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2004-07-26 13:18:07 +0000
commit17e576782c4fd64194d4908af5b9774308f1205f (patch)
tree17dd493a05fe17e0e2f90d9dbf30551dd7d97e35 /Test
parent725616d600e4e574aa1cdd3ac0abe874a512fe14 (diff)
downloadzsh-17e576782c4fd64194d4908af5b9774308f1205f.tar.gz
zsh-17e576782c4fd64194d4908af5b9774308f1205f.tar.xz
zsh-17e576782c4fd64194d4908af5b9774308f1205f.zip
20198: fix TRAPEXIT.
Diffstat (limited to 'Test')
-rw-r--r--Test/C03traps.ztst7
-rw-r--r--Test/Makefile.in3
-rwxr-xr-xTest/ztst.zsh2
3 files changed, 11 insertions, 1 deletions
diff --git a/Test/C03traps.ztst b/Test/C03traps.ztst
index 26ba73da5..3ef399efd 100644
--- a/Test/C03traps.ztst
+++ b/Test/C03traps.ztst
@@ -57,6 +57,13 @@
 >Function 1 going
 >Function 2 going
 
+# $ZTST_exe is relative to the parent directory.
+# We ought to fix this in ztst.zsh...
+  cd ..
+  $ZTST_exe -fc 'TRAPEXIT() { print Exited.; }'
+0:EXIT traps on a script
+>Exited.
+
   fn1() {
     trap
     trap 'print INT1' INT
diff --git a/Test/Makefile.in b/Test/Makefile.in
index 2e14b99ea..1e03c703f 100644
--- a/Test/Makefile.in
+++ b/Test/Makefile.in
@@ -46,7 +46,8 @@ check test:
 	  $(MAKE) MODDIR=`pwd`/$(subdir)/Modules install.modules > /dev/null; \
 	fi
 	-for f in $(sdir)/$(TESTNUM)*.ztst; do \
-	  $(dir_top)/Src/zsh +Z -f $(sdir)/ztst.zsh $$f; \
+	  ZTST_exe=$(dir_top)/Src/zsh \
+	    $(dir_top)/Src/zsh +Z -f $(sdir)/ztst.zsh $$f; \
 	done
 	rm -rf Modules .zcompdump
 
diff --git a/Test/ztst.zsh b/Test/ztst.zsh
index 51ca12a30..a110c401c 100755
--- a/Test/ztst.zsh
+++ b/Test/ztst.zsh
@@ -31,6 +31,8 @@ emulate -R zsh
 # Set the module load path to correspond to this build of zsh.
 # This Modules directory should have been created by "make check".
 [[ -d Modules/zsh ]] && module_path=( $PWD/Modules )
+# Allow this to be passed down.
+export MODULE_PATH
 
 # We need to be able to save and restore the options used in the test.
 # We use the $options variable of the parameter module for this.