about summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>2000-03-03 18:42:49 +0000
committerTanaka Akira <akr@users.sourceforge.net>2000-03-03 18:42:49 +0000
commita3864f056f0d0e1df4b5e4f5bc776af858c6a4d9 (patch)
tree636ba9b53029411dd58a7def4857b5deef11e6db /Test
parent097e2d70cdd55b8f8dba9c6724564f78e45529cc (diff)
downloadzsh-a3864f056f0d0e1df4b5e4f5bc776af858c6a4d9.tar.gz
zsh-a3864f056f0d0e1df4b5e4f5bc776af858c6a4d9.tar.xz
zsh-a3864f056f0d0e1df4b5e4f5bc776af858c6a4d9.zip
zsh-workers/9982
Diffstat (limited to 'Test')
-rw-r--r--Test/53completion.ztst1
-rw-r--r--Test/Makefile.in7
-rw-r--r--Test/comptest6
-rwxr-xr-xTest/ztst.zsh7
4 files changed, 20 insertions, 1 deletions
diff --git a/Test/53completion.ztst b/Test/53completion.ztst
index 03226fbe9..2b6964fcb 100644
--- a/Test/53completion.ztst
+++ b/Test/53completion.ztst
@@ -3,6 +3,7 @@
 %prep
   zmodload -i zsh/zpty
 
+  export ZTST_testdir ZTST_srcdir
   comptest () { $ZTST_testdir/../Src/zsh -f $ZTST_srcdir/comptest -z $ZTST_testdir/../Src/zsh -d $ZTST_testdir/compdump.tmp "$@" }
 
   mkdir comp.tmp
diff --git a/Test/Makefile.in b/Test/Makefile.in
index 107b61f58..4b68755a5 100644
--- a/Test/Makefile.in
+++ b/Test/Makefile.in
@@ -41,9 +41,14 @@ INSTALL         = @INSTALL@
 # ========== DEPENDENCIES FOR TESTING ==========
 
 check test:
+	if test -n "$(DLLD)"; then \
+	  cd $(dir_top) && \
+	  $(MAKE) MODDIR=`pwd`/$(subdir)/Modules install.modules > /dev/null; \
+	fi
 	for f in $(sdir)/*.ztst; do \
-	  ../Src/zsh -f $(sdir)/ztst.zsh $$f; \
+	  $(dir_top)/Src/zsh -f $(sdir)/ztst.zsh $$f; \
 	done
+	rm -rf Modules
 
 # ========== DEPENDENCIES FOR CLEANUP ==========
 
diff --git a/Test/comptest b/Test/comptest
index 59bd9e60c..18faea4d8 100644
--- a/Test/comptest
+++ b/Test/comptest
@@ -1,8 +1,12 @@
 #!/usr/local/bin/zsh -f
 
+[[ -d $ZTST_testdir/Modules/zsh ]] && module_path=( $ZTST_testdir/Modules )
+
 zmodload -i zsh/zpty
 setopt extendedglob
 
+fpath=( ${ZTST_srcdir:h}/(Completion|Functions)/*~*/CVS(/) )
+
 debug=
 dump=(-D)
 code=
@@ -24,6 +28,8 @@ input="$*"
 tmp=/tmp/comptest.$$
 
 cat <<End >$tmp
+module_path=( $module_path )
+fpath=( $fpath )
 stty columns 80 rows 24
 LISTMAX=10000000
 ZLS_COLORS='no=<NO>:fi=<FI>:di=<DI>:ln=<LN>:pi=<PI>:so=<SO>:bd=<BD>:cd=<CD>:ex=<EX>:mi=<MI>:tc=<TC>:sp=<SP>:lc=<LC>:ec=<EC>\n:rc=<RC>'
diff --git a/Test/ztst.zsh b/Test/ztst.zsh
index 181148c2b..b3f6de16b 100755
--- a/Test/ztst.zsh
+++ b/Test/ztst.zsh
@@ -22,6 +22,10 @@
 # still not be good enough.  Maybe we should trick it somehow.
 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 )
+
 # 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.
 zmodload -i zsh/parameter
@@ -47,6 +51,9 @@ ZTST_testname=$1
 ZTST_srcdir=${0%/*}
 [[ $ZTST_srcdir = /* ]] || ZTST_srcdir="$ZTST_testdir/$ZTST_srcdir"
 
+# Set the function autoload paths to correspond to this build of zsh.
+fpath=( ${ZTST_srcdir:h}/(Completion|Functions)/*~*/CVS(/) )
+
 : ${TMPPREFIX:=/tmp/zsh}
 # Temporary files for redirection inside tests.
 ZTST_in=${TMPPREFIX}.ztst.in.$$