From 91552c9a8ba370242cb3dc478c3bcc9351262493 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 7 Oct 2003 09:18:55 +0000 Subject: [PATCH] New test marcxml --- configure.in | 3 +- test/Makefile.am | 2 +- test/malxml/test1.sh | 7 ++++- test/marcxml/Makefile.am | 9 ++++++ test/marcxml/m1.xml | 32 ++++++++++++++++++++ test/marcxml/m2.xml | 32 ++++++++++++++++++++ test/marcxml/m3.xml | 73 ++++++++++++++++++++++++++++++++++++++++++++++ test/marcxml/record.abs | 13 +++++++++ test/marcxml/test1.sh | 16 ++++++++++ test/marcxml/zebra.cfg | 17 +++++++++++ 10 files changed, 201 insertions(+), 3 deletions(-) create mode 100644 test/marcxml/Makefile.am create mode 100644 test/marcxml/m1.xml create mode 100644 test/marcxml/m2.xml create mode 100644 test/marcxml/m3.xml create mode 100644 test/marcxml/record.abs create mode 100755 test/marcxml/test1.sh create mode 100644 test/marcxml/zebra.cfg diff --git a/configure.in b/configure.in index 6403204..a6d526a 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ dnl Zebra, Index Data Aps, 1995-2003 -dnl $Id: configure.in,v 1.85 2003-09-26 10:36:27 adam Exp $ +dnl $Id: configure.in,v 1.86 2003-10-07 09:18:55 adam Exp $ dnl AC_INIT(include/zebraver.h) AM_INIT_AUTOMAKE(idzebra,1.3.13) @@ -390,6 +390,7 @@ AC_OUTPUT([ test/config/Makefile perl/Makefile.PL test/xelm/Makefile test/dmoz/Makefile test/xpath/Makefile test/sort/Makefile test/zsh/Makefile + test/marcxml/Makefile examples/Makefile examples/gils/Makefile examples/zthes/Makefile idzebra.spec ]) diff --git a/test/Makefile.am b/test/Makefile.am index f4141bc..f587ffe 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1,3 +1,3 @@ -SUBDIRS=api gils malxml config usmarc dmoz xpath sort xelm cddb rusmarc zsh +SUBDIRS=api gils malxml config usmarc dmoz xpath sort xelm cddb rusmarc zsh marcxml diff --git a/test/malxml/test1.sh b/test/malxml/test1.sh index b2bdbd8..6cda301 100755 --- a/test/malxml/test1.sh +++ b/test/malxml/test1.sh @@ -1,4 +1,9 @@ #!/bin/sh LOG=test1.log -../../index/zebraidx -l $LOG init +rm -f $LOG +if ../../index/zebraidx -l $LOG -V|grep Expat >/dev/null; then + ../../index/zebraidx -l$LOG init +else + exit 0 +fi ../../index/zebraidx -l $LOG update f1.xml diff --git a/test/marcxml/Makefile.am b/test/marcxml/Makefile.am new file mode 100644 index 0000000..a75b504 --- /dev/null +++ b/test/marcxml/Makefile.am @@ -0,0 +1,9 @@ +# $Id: Makefile.am,v 1.1 2003-10-07 09:18:56 adam Exp $ + +check_SCRIPTS = test1.sh + +TESTS = $(check_SCRIPTS) + +EXTRA_DIST = zebra.cfg record.abs m1.xml m2.xml m3.xml \ + $(check_SCRIPTS) + diff --git a/test/marcxml/m1.xml b/test/marcxml/m1.xml new file mode 100644 index 0000000..0a61202 --- /dev/null +++ b/test/marcxml/m1.xml @@ -0,0 +1,32 @@ + + 00366nam 22001698a 4500 + 11224466 + DLC + 00000000000000.0 + 910710c19910701nju 00010 eng + + 11224466 + + + DLC + DLC + + + 123-xyz + + + Jack Collins + + + How to program a computer + + + Penguin + + + 8710 + + + p. cm. + + diff --git a/test/marcxml/m2.xml b/test/marcxml/m2.xml new file mode 100644 index 0000000..561b5db --- /dev/null +++ b/test/marcxml/m2.xml @@ -0,0 +1,32 @@ + + 00366nam 22001698a 4500 + 11224467 + DLC + 00000000000000.0 + 910710c19910701nju 00010 eng + + 11224467 + + + DLC + DLC + + + 123-xyz + + + Jack Collins + + + How to program a computer + + + Penguin + + + 8710 + + + p. cm. + + diff --git a/test/marcxml/m3.xml b/test/marcxml/m3.xml new file mode 100644 index 0000000..794d81e --- /dev/null +++ b/test/marcxml/m3.xml @@ -0,0 +1,73 @@ + + 01369cam 2200265 i 4500 + 73090924 //r82 + DLC + 19820524000000.0 + 760609s1974 nyua b 10110 eng + + 73090924 //r82 + + + DLC + DLC + DLC + + + RC71.3 + .W67 1971 + + + 616.07/575/02854 + + + Workshop on Computer Processing of Dynamic Images from an Anger Scintillation Camera, + Washington University, + 1971. + + + Computer processing of dynamic images from an Anger scintillation camera : + the proceedings of a workshop / + cosponsored by the Biomedical Computer Laboratory and the Nuclear Medicine Division, Department of Radiology, School of Medicine, Washington University, St. Louis, January 18-22, 1971 ; edited by Kenneth B. Larson, Jerome R. Cox, Jr. + + + New York : + Society of Nuclear Medicine, + [c1974] + + + xiv, p. : + ill. ; + 24 cm. + + + Includes bibliographical references and index. + + + Radioisotope scanning + Data processing + Congresses. + + + Scintillation cameras + Congresses. + + + Imaging systems in medicine + Data processing + Congresses. + + + Larson, Kenneth B. + + + Cox, Jerome R. + + + Washington University, St. Louis. + Biomedical Computer Laboratory. + + + Washington University, St. Louis. + Nuclear Medicine Division. + + diff --git a/test/marcxml/record.abs b/test/marcxml/record.abs new file mode 100644 index 0000000..e11c423 --- /dev/null +++ b/test/marcxml/record.abs @@ -0,0 +1,13 @@ +# $Id: record.abs,v 1.1 2003-10-07 09:18:56 adam Exp $ + +name marcxml +attset bib1.att + +esetname F @ +esetname B @ + +xpath disable + +xelm /record/datafield[@tag="100"]/subfield[@code="a"] author:w +xelm /record/datafield[@tag="245"]/subfield title:w + diff --git a/test/marcxml/test1.sh b/test/marcxml/test1.sh new file mode 100755 index 0000000..58bb388 --- /dev/null +++ b/test/marcxml/test1.sh @@ -0,0 +1,16 @@ +#!/bin/sh +LOG=test1.log +rm -f $LOG +if ../../index/zebraidx -l $LOG -V|grep Expat >/dev/null; then + ../../index/zebraidx -l$LOG init +else + exit 0 +fi +../../index/zebraidx -l$LOG update m*.xml +../../index/zebrasrv -l$LOG unix:socket & +sleep 1 +../api/testclient unix:socket '@and @attr 1=1003 jack @attr 1=4 computer' >tmp1 +echo 'Result count: 2' >tmp2 +kill `cat zebrasrv.pid` || exit 1 +diff tmp1 tmp2 || exit 2 +rm -f tmp1 tmp2 diff --git a/test/marcxml/zebra.cfg b/test/marcxml/zebra.cfg new file mode 100644 index 0000000..3a675e1 --- /dev/null +++ b/test/marcxml/zebra.cfg @@ -0,0 +1,17 @@ +# Simple Zebra configuration file +# $Id: zebra.cfg,v 1.1 2003-10-07 09:18:56 adam Exp $ +# +# Where the schema files, attribute files, etc are located. +profilePath: .:../../tab + +# Files that describe the attribute sets supported. +attset: bib1.att +attset: gils.att +attset: explain.att + +recordtype: grs.xml + +#storekeys: 1 +#storedata: 1 +#recordId: (bib1,identifier-standard) +isam: b -- 1.7.10.4