X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=t%2Fsrc%2Ftest_prologue.sh;fp=t%2Fsrc%2Ftest_prologue.sh;h=dfbdb4daabf5e1401d582b8dd505590c420ba03e;hb=05f0c0416fcaa3ef33a108c1d6660773ccb1d350;hp=0000000000000000000000000000000000000000;hpb=c17659f470a0ffcfea7ee139b11a82248ed61173;p=gedcom-parse.git diff --git a/t/src/test_prologue.sh b/t/src/test_prologue.sh new file mode 100644 index 0000000..dfbdb4d --- /dev/null +++ b/t/src/test_prologue.sh @@ -0,0 +1,50 @@ +# $Id$ +# $Name$ +# Common prologue for the test scripts + +extra_options= + +while [ $# -gt 0 ] +do + case "$1" in + -*) extra_options="$extra_options $1";; + *) break;; + esac + shift +done + +test_name=$1 +shift +expected_result=$1 +shift +if [ -z "$test_name" ] +then + test_name=check +fi +if [ -z "$expected_result" ] +then + expected_result=0 +fi + +# For use outside Makefile +if [ -z "$srcdir" ] +then + : +else + options="-q $extra_options" +fi + +outfile=$test_name.out +logfile=check.out +reffile=$srcdir/output/$test_name.ref +options="$options -o $outfile" + +GCONV_PATH=.:$GCONV_PATH +export GCONV_PATH +LANG=C +export LANG +ln -s $srcdir/../data/gedcom.enc . +ln -s $builddir/../data/new.ged . +ln -s $builddir/../iconv/glibc/.libs/ANSI_Z39.47.so . +ln -s $srcdir/../iconv/glibc/gconv-modules . +rm -f core