Test writing of a read gedcom file.
[gedcom-parse.git] / t / src / test_writegom
1 #!/bin/sh
2 # $Id$
3 # $Name$
4
5 builddir=`pwd`
6 if [ -z "$srcdir" ]
7 then
8   srcdir=.
9 fi
10
11 test_program=writegomtest
12 test_libs="$builddir/../gedcom/libgedcom.la $builddir/../gom/libgedcom_gom.la"
13 gedcom_out=1
14
15 . $srcdir/src/test_prologue.sh
16
17 terminator=$1
18 encoding=$2
19 unicode_details=$3
20 infile=$4
21 options="$options -t $terminator -e $encoding"
22
23 if [ "$infile" ]
24 then
25   if [ -z "$srcdir" ]
26   then
27     testfile=$infile
28   else
29     case $file in
30       ./*) testfile=$infile ;;
31       *)   testfile=$srcdir/input/$infile ;;
32     esac
33   fi
34   options="$options -i $testfile"
35 fi
36
37 if [ "$encoding" == "UNICODE" ]
38 then
39   options="$options -u $unicode_details"
40 fi
41
42 . $srcdir/src/test_bulk.sh