## Copyright (C) 1994-2004, Index Data
## All rights reserved.
-## $Id: Makefile.am,v 1.2 2004-03-10 16:34:30 adam Exp $
+## $Id: Makefile.am,v 1.3 2004-10-01 11:43:43 adam Exp $
check_PROGRAMS = tsticonv tstnmem tstmatchstr tstwrbuf tstodr tstccl
-check_SCRIPTS = tstcql.sh
+check_SCRIPTS = tstcql.sh tstmarc.sh
TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
-EXTRA_DIST = tstodr.asn tstodrcodec.c tstodrcodec.h cqlsample $(check_SCRIPTS)
+EXTRA_DIST = tstodr.asn tstodrcodec.c tstodrcodec.h cqlsample \
+ $(check_SCRIPTS) \
+ marc1 marc1.xml marc2 marc2.xml marc3 marc3.xml
YAZCOMP = $(top_srcdir)/util/yaz-asncomp
YAZCOMPLINE = $(YAZCOMP) -d z.tcl -i yaz -I../include $(YCFLAGS)
tstodrcodec.c tstodrcodec.h: tstodr.asn $(YAZCOMP)
cd $(srcdir); $(YAZCOMP) tstodr.asn
-# Tests..
-tsticonv_LDADD = ../src/libyaz.la
+LDADD = ../src/libyaz.la
+
tsticonv_SOURCES = tsticonv.c
-tstnmem_LDADD = ../src/libyaz.la
tstnmem_SOURCES = tstnmem.c
-tstmatchstr_LDADD = ../src/libyaz.la
tstmatchstr_SOURCES = tstmatchstr.c
-tstwrbuf_LDADD = ../src/libyaz.la
tstwrbuf_SOURCES = tstwrbuf.c
-tstodr_LDADD = ../src/libyaz.la
tstodr_SOURCES = tstodrcodec.c tstodrcodec.h tstodr.c
-tstccl_LDADD = ../src/libyaz.la
tstccl_SOURCES = tstccl.c
--- /dev/null
+00988nam0 32003011 45 001002800000004001000028008002800038009001100066021002700077032001500104100002100119245005400140250004100194260004000235300002700275504012300302512006000425520005000485652002400535652001600559666001600575666001900591666001500610666001800625666001900643666000900662666001500671\1e000\1fa9 181 423 4\1fb710100\1ffa\1e000\1frn\1fae\1e000\1ftm\1fuu\1fa2002\1fbus\1fleng\1fv0\1e000\1faa\1fgxx\1e000\1fa1-4000-4596-7\1fd$14,00\1e000\1f&DBC200439\1e000\1f0\1faSloman\1fhLarry\1e000\1faOn the road with Bob Dylan\1feLarry "Ratso" Sloman\1e000\1faRevised edition\1fbThree Rivers Press\1e000\1faNew York\1fbThree Rivers Press\1fc2002\1e000\1faxv, 464 sider, tavler\1e000\1faLarry "Ratso" Slomans meget personlige beretning om Bob Dylans koncertturne i USA i 1975: "The Rolling Thunder revue"\1e000\1faPå omslaget: With a new introduction by Kinky Friedman\1e000\1faTidligere: 1. udgave. New York, Bantam, 1978\1e000\1f0\1fm99.4\1faDylan\1fhBob\1e000\1fp78.9064\1fv5\1e000\1fffolkemusik\1e000\1fffolkemusikere\1e000\1ffrockmusik\1e000\1ffrockmusikere\1e000\1ffrockkoncerter\1e000\1feUSA\1e000\1fi1970-1979\1e\1d
\ No newline at end of file
--- /dev/null
+#!/bin/sh
+# $Id: tstmarc.sh,v 1.1 2004-10-01 11:43:43 adam Exp $
+srcdir=${srcdir:-.}
+ecode=0
+for f in ${srcdir}/marc?; do
+ NEW=${f}.new.xml
+ OLD=${f}.xml
+ DIFF=${f}.diff
+ ../util/yaz-marcdump -f iso-8859-1 -t utf-8 -X $f > $NEW
+ if test $? != "0"; then
+ echo "Failed decode of $f"
+ ecode=1
+ elif test -f $OLD; then
+ if diff $OLD $NEW >$DIFF; then
+ rm $DIFF
+ rm $NEW
+ else
+ echo "Differ in $f"
+ ecode=1
+ fi
+ else
+ echo "Making test $f for the first time"
+ if test -x /usr/bin/xmllint; then
+ if xmllint --noout $NEW >out 2>stderr; then
+ echo "XML for $f is OK"
+ mv $NEW $OLD
+ else
+ echo "XML for $f is invalid"
+ ecode=1
+ fi
+ else
+ echo "xmllint not found. install libxml2-utils"
+ ecode=1
+ fi
+ fi
+done
+exit $ecode
\ No newline at end of file