X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=test%2Ftstmarc.sh;h=90adf1bae1e61f7da460b42c6ca1fbdf07282959;hp=2529698b00e3ec24d665da90445a135c790442f3;hb=d36517ad4b5054144bfcddf221c546cb61af9ea0;hpb=ec6494bdb7c628db3b19c523db32d11a44225f79 diff --git a/test/tstmarc.sh b/test/tstmarc.sh index 2529698..90adf1b 100755 --- a/test/tstmarc.sh +++ b/test/tstmarc.sh @@ -23,7 +23,8 @@ binmarc_convert() { NEW=${PREFIX}${fb}.new.xml OLD=${srcdir}/${PREFIX}${fb}.xml DIFF=`basename ${f}`.diff - ../util/yaz-marcdump -f $CHR -t utf-8 -o ${OUTPUT_FORMAT} $f > $NEW + #echo "../util/yaz-marcdump -f $CHR -t utf-8 -i marc -o ${OUTPUT_FORMAT} $f > $NEW" + ../util/yaz-marcdump -f $CHR -t utf-8 -i marc -o ${OUTPUT_FORMAT} $f > $NEW if test $? != "0"; then echo "$f: yaz-marcdump returned error" ecode=1 @@ -63,7 +64,7 @@ binmarc_convert() { echo "Failed decode of $f" ecode=1 elif test -f $OLD; then -# echo "diff $OLD $NEW " +# echo "diff $OLD $NEW " if diff $OLD $NEW >$DIFF; then rm $DIFF rm $NEW @@ -77,10 +78,10 @@ binmarc_convert() { fi # check with original REVERT=`basename ${f}`.marc.revert - ../util/yaz-marcdump -f utf-8 -t $CHR -i ${REVERT_FORMAT} -o marc $f > $REVERT - hexdump -cx $REVERT > $REVERT.hex - hexdump -cx $ORIGINAL > $ORIGINAL.hex - diff $REVERT.hex $ORIGINAL.hex > $REVERT.diff + #../util/yaz-marcdump -f utf-8 -t $CHR -i ${REVERT_FORMAT} -o marc $f > $REVERT + #hexdump -cx $REVERT > $REVERT.hex + #hexdump -cx $ORIGINAL > $ORIGINAL.hex + #diff $REVERT.hex $ORIGINAL.hex > $REVERT.diff fi done return $ecode @@ -92,10 +93,13 @@ echo "binmarc -> marcxml: $?" binmarc_convert "xml,marcxml" "marcxml" "xml2" echo "binmarc -> marcxml(libxml2): $?" -binmarc_convert "xml,tmarcxml" "tmarcxml" "t" +binmarc_convert "tmarcxml" "tmarcxml" "t" echo "binmarc -> tmarcxml: $?" -# exit $ecode +binmarc_convert "xml,tmarcxml" "tmarcxml" "xml2t" +echo "binmarc -> tmarcxml(libxml2): $?" + +exit $ecode # Local Variables: # mode:shell-script