2 # $Id: tstmarciso.sh,v 1.2 2006-04-20 19:47:02 adam Exp $
3 # Tests reading of ISO2709 and checks that we get identical MARCXML
6 for f in ${srcdir}/marc?; do
7 NEW=`basename ${f}`.new.xml
9 DIFF=`basename ${f}`.diff
10 ../util/yaz-marcdump -f `cat ${f}.chr` -t utf-8 -X $f > $NEW
11 if test $? != "0"; then
12 echo "$f: yaz-marcdump returned error"
14 elif test -f $OLD; then
15 if diff $OLD $NEW >$DIFF; then
19 echo "$f: $NEW and $OLD differ"
23 echo "$f: Making test result $OLD for the first time"
24 if test -x /usr/bin/xmllint; then
25 if xmllint --noout $NEW >out 2>stderr; then
26 echo "$f: $NEW is well-formed"
29 echo "$f: $NEW not well-formed"
33 echo "xmllint not found. install libxml2-utils"