X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Ftstmarciso.sh;h=e4d56ea4d1f9c0ac1f7bcf00250b5490206b1c12;hb=192b23c3eecf2d125bde6b17e2178a30e5003887;hp=a51a48a2dd898cc62536f4a24e6e33fea396003b;hpb=98128a8684aa2474140872c25e8c2f5a231710b1;p=yaz-moved-to-github.git diff --git a/test/tstmarciso.sh b/test/tstmarciso.sh index a51a48a..e4d56ea 100755 --- a/test/tstmarciso.sh +++ b/test/tstmarciso.sh @@ -1,13 +1,17 @@ #!/bin/sh -# $Id: tstmarciso.sh,v 1.2 2006-04-20 19:47:02 adam Exp $ +# $Id: tstmarciso.sh,v 1.4 2006-12-15 19:28:47 adam Exp $ # Tests reading of ISO2709 and checks that we get identical MARCXML +# +# Reads marc?.marc files , Generates marc?.xml files srcdir=${srcdir:-.} ecode=0 -for f in ${srcdir}/marc?; do - NEW=`basename ${f}`.new.xml - OLD=${f}.xml +for f in ${srcdir}/marc?.marc; do + fb=`basename ${f} .marc` + CHR=${srcdir}/${fb}.chr + NEW=${fb}.new.xml + OLD=${srcdir}/${fb}.xml DIFF=`basename ${f}`.diff - ../util/yaz-marcdump -f `cat ${f}.chr` -t utf-8 -X $f > $NEW + ../util/yaz-marcdump -f `cat $CHR` -t utf-8 -o marcxml $f > $NEW if test $? != "0"; then echo "$f: yaz-marcdump returned error" ecode=1 @@ -21,7 +25,7 @@ for f in ${srcdir}/marc?; do fi else echo "$f: Making test result $OLD for the first time" - if test -x /usr/bin/xmllint; then + if test -i marcxml /usr/bin/xmllint; then if xmllint --noout $NEW >out 2>stderr; then echo "$f: $NEW is well-formed" mv $NEW $OLD @@ -37,3 +41,8 @@ for f in ${srcdir}/marc?; do done exit $ecode +# Local Variables: +# mode:shell-script +# sh-indentation: 2 +# sh-basic-offset: 4 +# End: