X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=t%2Ftest_script;h=cd943a33c6bd3f11fdd2b21dc44c827a31674b2f;hb=65d9238580688605c38a0df217708395c2e77c1f;hp=c45478e18bc3627e1e17bda545f6ead47e447a21;hpb=7bc612e640874d02aafb09c0b67eece63192ebd0;p=gedcom-parse.git diff --git a/t/test_script b/t/test_script index c45478e..cd943a3 100755 --- a/t/test_script +++ b/t/test_script @@ -2,13 +2,35 @@ # $Id$ # $Name$ +options="-q" + +while [ $# -gt 0 ] +do + case "$1" in + -*) options="$options $1";; + *) break;; + esac + shift +done + file=$1 +expected_result=$2 +if [ -z "$expected_result" ] +then + expected_result=0 +fi builddir=`pwd` cd $srcdir/.. -export GCONV_PATH=$GCONV_PATH:./ansel -export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$builddir/../gedcom/.libs +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 -echo "=== testing $file" -$builddir/../testgedcom -2 t/$file +$builddir/../testgedcom $options t/input/$file +result=$? rm ansel/ANSI_Z39.47.so +if [ "$result" -eq "$expected_result" ] +then + exit 0 +else + exit 1 +fi