From df3831d75a7fbbfd7f178dcf1a4df8539731521a Mon Sep 17 00:00:00 2001 From: Peter Verthez Date: Fri, 16 Aug 2002 16:27:36 +0000 Subject: [PATCH] Enhancements to use script outside make check. --- t/test_script | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/t/test_script b/t/test_script index ed62f9b..c5b6815 100755 --- a/t/test_script +++ b/t/test_script @@ -3,11 +3,12 @@ # $Name$ options="-q" +extra_options= while [ $# -gt 0 ] do case "$1" in - -*) options="$options $1";; + -*) extra_options="$extra_options $1";; *) break;; esac shift @@ -20,12 +21,23 @@ then expected_result=0 fi +# For use outside Makefile +if [ -z "$srcdir" ] +then + testfile=$file + srcdir=. + options=$extra_options +else + testfile=t/input/$file + options="$options $extra_options" +fi + builddir=`pwd` cd $srcdir/.. export GCONV_PATH=./ansel:$GCONV_PATH export LD_LIBRARY_PATH=$builddir/../gedcom/.libs:$LD_LIBRARY_PATH cp $builddir/../ansel/.libs/ANSI_Z39.47.so ansel -$builddir/testgedcom $options t/input/$file +$builddir/testgedcom $options $testfile result=$? rm ansel/ANSI_Z39.47.so if [ "$result" -eq "$expected_result" ] -- 2.30.2