2 # $Id: tstmarcxml.sh,v 1.3 2006-08-28 12:34:42 adam Exp $
3 # Tests reading of MARCXML and checks that we get identical ISO2709 output.
5 # Reads marc?.xml files , Generates marc?.xml.marc files
8 # Skip this test if Libxml2 support is not enabled
9 ../util/yaz-marcdump -x >/dev/null 2>&1
10 if test $? = "3"; then
13 for f in ${srcdir}/marc?.xml; do
14 NEW=`basename ${f}`.new.marc
16 DIFF=`basename ${f}`.diff
17 ../util/yaz-marcdump -f utf-8 -t utf-8 -x -I $f > $NEW
18 if test $? != "0"; then
19 echo "Failed decode of $f"
21 elif test -f $OLD; then
22 if diff $OLD $NEW >$DIFF; then
26 echo "$f: $NEW and $OLD Differ"
30 echo "$f: Making test result $OLD for the first time"