X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=t%2Fsrc%2Ftest_script;h=3753da40b644ded15a3319ff6a8d3c343d8ed1af;hb=d41803b9c1bcafabf115a188e3b4a489103bbdca;hp=90c21337a267a3f685821c738f1201e2b5d8a0f1;hpb=04988ba5760b68a017ddf88d9834f47c86a8a4fe;p=gedcom-parse.git diff --git a/t/src/test_script b/t/src/test_script index 90c2133..3753da4 100755 --- a/t/src/test_script +++ b/t/src/test_script @@ -2,51 +2,28 @@ # $Id$ # $Name$ -options="-q" -extra_options= +builddir=`pwd` +if [ -z "$srcdir" ] +then + srcdir=. +fi -while [ $# -gt 0 ] -do - case "$1" in - -*) extra_options="$extra_options $1";; - *) break;; - esac - shift -done +. $srcdir/src/test_prologue.sh file=$1 -expected_result=$2 -if [ -z "$expected_result" ] -then - expected_result=0 -fi -# For use outside Makefile if [ -z "$srcdir" ] then testfile=$file - srcdir=. - options=$extra_options else - testfile=$srcdir/input/$file - options="$options $extra_options" + case $file in + ./*) testfile=$file ;; + *) testfile=$srcdir/input/$file ;; + esac fi -builddir=`pwd` -ltcmd="$srcdir/../libtool --mode=execute -dlopen $builddir/../gedcom/libgedcom.la" -export GCONV_PATH=.:$GCONV_PATH -ln -s $srcdir/../data/gedcom.enc . -ln -s $builddir/../iconv/glibc/.libs/ANSI_Z39.47.so . -ln -s $srcdir/../iconv/glibc/gconv-modules . -rm -f core -$ltcmd $GEDCOM_TESTENV $builddir/src/testgedcom $options $testfile -result=$? -rm gedcom.enc -rm ANSI_Z39.47.so -rm gconv-modules -if [ "$result" -eq "$expected_result" -a ! -r core ] -then - exit 0 -else - exit 1 -fi +test_program=testgedcom +test_libs=$builddir/../gedcom/libgedcom.la +test_args=$testfile + +. $srcdir/src/test_bulk.sh