dlugolecki.net.pl
Dziennik
Polecane
Software
projects
/
gedcom-parse.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Updated.
[gedcom-parse.git]
/
t
/
test_script
diff --git
a/t/test_script
b/t/test_script
index fdef281fd7a660941217534e430e51cb0a8d0f0b..cd943a33c6bd3f11fdd2b21dc44c827a31674b2f 100755
(executable)
--- a/
t/test_script
+++ b/
t/test_script
@@
-2,13
+2,35
@@
# $Id$
# $Name$
# $Id$
# $Name$
+options="-q"
+
+while [ $# -gt 0 ]
+do
+ case "$1" in
+ -*) options="$options $1";;
+ *) break;;
+ esac
+ shift
+done
+
file=$1
file=$1
+expected_result=$2
+if [ -z "$expected_result" ]
+then
+ expected_result=0
+fi
builddir=`pwd`
cd $srcdir/..
builddir=`pwd`
cd $srcdir/..
-export GCONV_PATH=./ansel
-export 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
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
rm ansel/ANSI_Z39.47.so
+if [ "$result" -eq "$expected_result" ]
+then
+ exit 0
+else
+ exit 1
+fi