From: Adam Dickmeiss Date: Tue, 9 Mar 2004 18:45:17 +0000 (+0000) Subject: Add test case for test/rusmarc X-Git-Tag: ZEBRA.1.3.16~126 X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=commitdiff_plain;h=70a624aa45d292ba54c94ff51ce3e7e2f890c467 Add test case for test/rusmarc --- diff --git a/test/rusmarc/Makefile.am b/test/rusmarc/Makefile.am index 536c203..4b01e59 100644 --- a/test/rusmarc/Makefile.am +++ b/test/rusmarc/Makefile.am @@ -1,5 +1,10 @@ +# $Id: Makefile.am,v 1.3 2004-03-09 18:45:17 adam Exp $ -EXTRA_DIST = zebra.cfg test.sh +check_SCRIPTS = test1.sh + +TESTS = $(check_SCRIPTS) + +EXTRA_DIST = zebra.cfg test.sh $(check_SCRIPTS) dist-hook: mkdir -p $(distdir)/records diff --git a/test/rusmarc/test.sh b/test/rusmarc/test.sh index c924b19..6003151 100755 --- a/test/rusmarc/test.sh +++ b/test/rusmarc/test.sh @@ -1,12 +1,12 @@ #!/bin/sh -# $Id: test.sh,v 1.3 2003-05-06 17:39:01 adam Exp $ +# $Id: test.sh,v 1.4 2004-03-09 18:45:17 adam Exp $ test -d tmp || mkdir tmp test -d lock || mkdir lock test -d register || mkdir register echo Loading Records if [ -x ../../index/zebraidx ]; then - ../../index/zebraidx update records + ../../index/zebraidx update records/simple-rusmarc fi echo Starting Server if [ -x ../../index/zebrasrv ]; then diff --git a/test/rusmarc/test1.sh b/test/rusmarc/test1.sh new file mode 100755 index 0000000..4566ebb --- /dev/null +++ b/test/rusmarc/test1.sh @@ -0,0 +1,15 @@ +#!/bin/sh +# $Id: test1.sh,v 1.1 2004-03-09 18:45:17 adam Exp $ +LOG=test1.log +rm -f $LOG +../../index/zebraidx -l$LOG init +../../index/zebraidx -l$LOG update records/*marc +../../index/zebrasrv -l$LOG unix:socket & +sleep 1 +# search text located in first record 600 $a +# term is koi8-r encoded +../api/testclient unix:socket '@attr 1=21 úÁÍÑÔÉÎ' >tmp1 +echo 'Result count: 1' >tmp2 +kill `cat lock/zebrasrv.pid` || exit 1 +diff tmp1 tmp2 || exit 2 +rm -f tmp1 tmp2