projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed spelling error. Add SOLR client only comment
[yaz-moved-to-github.git]
/
test
/
tstmarc.sh
diff --git
a/test/tstmarc.sh
b/test/tstmarc.sh
index
90adf1b
..
2996bb4
100755
(executable)
--- a/
test/tstmarc.sh
+++ b/
test/tstmarc.sh
@@
-13,6
+13,11
@@
if test $? = "3"; then
noxml=1
fi
noxml=1
fi
+../util/yaz-marcdump -o xml,marcxml >/dev/null 2>&1
+if test $? = "4"; then
+ noxmlwrite=1
+fi
+
binmarc_convert() {
OUTPUT_FORMAT="$1"
REVERT_FORMAT="$2"
binmarc_convert() {
OUTPUT_FORMAT="$1"
REVERT_FORMAT="$2"
@@
-59,12
+64,12
@@
binmarc_convert() {
OLD=${f}.marc
NEW=`basename ${f}`.new.marc
DIFF=`basename ${f}`.diff
OLD=${f}.marc
NEW=`basename ${f}`.new.marc
DIFF=`basename ${f}`.diff
+ #echo "../util/yaz-marcdump -f utf-8 -t utf-8 -i ${REVERT_FORMAT} -o marc $f > $NEW"
../util/yaz-marcdump -f utf-8 -t utf-8 -i ${REVERT_FORMAT} -o marc $f > $NEW
if test $? != "0"; then
echo "Failed decode of $f"
ecode=1
elif test -f $OLD; then
../util/yaz-marcdump -f utf-8 -t utf-8 -i ${REVERT_FORMAT} -o marc $f > $NEW
if test $? != "0"; then
echo "Failed decode of $f"
ecode=1
elif test -f $OLD; then
-# echo "diff $OLD $NEW "
if diff $OLD $NEW >$DIFF; then
rm $DIFF
rm $NEW
if diff $OLD $NEW >$DIFF; then
rm $DIFF
rm $NEW
@@
-90,14
+95,19
@@
binmarc_convert() {
binmarc_convert "marcxml" "marcxml" ""
echo "binmarc -> marcxml: $?"
binmarc_convert "marcxml" "marcxml" ""
echo "binmarc -> marcxml: $?"
+
+if test -z "$noxmlwrite"; then
binmarc_convert "xml,marcxml" "marcxml" "xml2"
echo "binmarc -> marcxml(libxml2): $?"
binmarc_convert "xml,marcxml" "marcxml" "xml2"
echo "binmarc -> marcxml(libxml2): $?"
+fi
-binmarc_convert "tmarcxml" "tmarcxml" "t"
-echo "binmarc -> tmarcxml: $?"
+binmarc_convert "turbomarc" "turbomarc" "t"
+echo "binmarc -> turbomarc: $?"
-binmarc_convert "xml,tmarcxml" "tmarcxml" "xml2t"
-echo "binmarc -> tmarcxml(libxml2): $?"
+if test -z "$noxmlwrite"; then
+binmarc_convert "xml,turbomarc" "turbomarc" "xml2t"
+echo "binmarc -> turbomarc(libxml2): $?"
+fi
exit $ecode
exit $ecode