X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=t%2Ftest_script;h=cd943a33c6bd3f11fdd2b21dc44c827a31674b2f;hb=65d9238580688605c38a0df217708395c2e77c1f;hp=cec97924296073ea097f571ec8ddc43287fd77ff;hpb=46ed72bc448eb293a9ed2492ac254acc676699fd;p=gedcom-parse.git diff --git a/t/test_script b/t/test_script index cec9792..cd943a3 100755 --- a/t/test_script +++ b/t/test_script @@ -2,15 +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 -exit $result +if [ "$result" -eq "$expected_result" ] +then + exit 0 +else + exit 1 +fi