Added missing header.
[gedcom-parse.git] / t / src / test_prologue.sh
1 # $Id$
2 # $Name$
3 # Common prologue for the test scripts
4
5 extra_options=
6
7 while [ $# -gt 0 ]
8 do
9   case "$1" in
10     -*) extra_options="$extra_options $1";;
11     *)  break;;
12   esac
13   shift
14 done
15
16 test_name=$1
17 shift
18 expected_result=$1
19 shift
20 if [ -z "$test_name" ]
21 then
22   test_name=check
23 fi
24 if [ -z "$expected_result" ]
25 then
26   expected_result=0
27 fi
28
29 # For use outside Makefile
30 if [ -z "$srcdir" ]
31 then
32   :
33 else
34   options="-q $extra_options"
35 fi
36
37 outfile=$test_name.out
38 logfile=check.out
39 reffile=$srcdir/output/$test_name.ref
40 options="$options -o $outfile"
41
42 GCONV_PATH=.:$GCONV_PATH
43 export GCONV_PATH
44 LANG=C
45 export LANG
46 ln -s $srcdir/../data/gedcom.enc .
47 ln -s $builddir/../data/new.ged .
48 ln -s $builddir/../iconv/glibc/.libs/ANSI_Z39.47.so .
49 ln -s $srcdir/../iconv/glibc/gconv-modules .
50 rm -f core