From 70a624aa45d292ba54c94ff51ce3e7e2f890c467 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 9 Mar 2004 18:45:17 +0000 Subject: [PATCH] Add test case for test/rusmarc --- test/rusmarc/Makefile.am | 7 ++++++- test/rusmarc/test.sh | 4 ++-- test/rusmarc/test1.sh | 15 +++++++++++++++ 3 files changed, 23 insertions(+), 3 deletions(-) create mode 100755 test/rusmarc/test1.sh 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 -- 1.7.10.4