X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=test%2Ftstmarcxml.sh;h=609362895cbc631c69fe34deca69b2bd9b5de01f;hp=7a970fb9e4b5b35ab1e1a55c9a140c4f49206f20;hb=57efcfe71d3485e8f2ddac6008fbbc8183804ac7;hpb=626ee9b09c95c3585c432623c042872b0d1fea92 diff --git a/test/tstmarcxml.sh b/test/tstmarcxml.sh index 7a970fb..6093628 100755 --- a/test/tstmarcxml.sh +++ b/test/tstmarcxml.sh @@ -1,6 +1,8 @@ #!/bin/sh -# $Id: tstmarcxml.sh,v 1.1 2006-04-19 10:05:04 adam Exp $ +# $Id: tstmarcxml.sh,v 1.4 2006-12-15 19:28:47 adam Exp $ # Tests reading of MARCXML and checks that we get identical ISO2709 output. +# +# Reads marc?.xml files , Generates marc?.xml.marc files srcdir=${srcdir:-.} ecode=0 # Skip this test if Libxml2 support is not enabled @@ -12,7 +14,7 @@ for f in ${srcdir}/marc?.xml; do NEW=`basename ${f}`.new.marc OLD=${f}.marc DIFF=`basename ${f}`.diff - ../util/yaz-marcdump -f utf-8 -t utf-8 -x -I $f > $NEW + ../util/yaz-marcdump -f utf-8 -t utf-8 -i marcxml -o marc $f > $NEW if test $? != "0"; then echo "Failed decode of $f" ecode=1 @@ -21,13 +23,18 @@ for f in ${srcdir}/marc?.xml; do rm $DIFF rm $NEW else - echo "Differ in $f" + echo "$f: $NEW and $OLD Differ" ecode=1 fi else - echo "Making test $f for the first time" + echo "$f: Making test result $OLD for the first time" mv $NEW $OLD fi done exit $ecode +# Local Variables: +# mode:shell-script +# sh-indentation: 2 +# sh-basic-offset: 4 +# End: