From: Heikki Levanto Date: Mon, 11 Nov 2002 15:40:56 +0000 (+0000) Subject: A simple test with *one* sgml record X-Git-Tag: ZEBRA.1.3.4~39 X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=commitdiff_plain;h=4ed7a26e63a0a8f537743b3c4c083c85fee4325a A simple test with *one* sgml record --- diff --git a/test/xpath/Makefile.am b/test/xpath/Makefile.am index 8180e73..6a097cc 100644 --- a/test/xpath/Makefile.am +++ b/test/xpath/Makefile.am @@ -1,4 +1,5 @@ -TESTS = test1.sh test2.sh test3.sh +TESTS = test1.sh test2.sh test3.sh \ + simple1.sh EXTRA_DIST = $(TESTS) zebra.cfg rec diff --git a/test/xpath/simple1.rec b/test/xpath/simple1.rec new file mode 100644 index 0000000..7a46f7d --- /dev/null +++ b/test/xpath/simple1.rec @@ -0,0 +1,9 @@ + + before + + inside + + after + + + diff --git a/test/xpath/simple1.sh b/test/xpath/simple1.sh new file mode 100755 index 0000000..7fdd94f --- /dev/null +++ b/test/xpath/simple1.sh @@ -0,0 +1,24 @@ +# simple1.sh - test with one simple sgml record + +LOG=simple1.log +../../index/zebraidx -l $LOG init || exit 1 +../../index/zebraidx -l $LOG update simple1.rec || exit 1 + +echo "Starting server " >> $LOG +../../index/zebrasrv -l $LOG -S unix:socket & +sleep 1 +test -f zebrasrv.pid || exit 2 + +../testclient unix:socket -c 0 '@attr 1=/sgml/tag before' >> $LOG || exit 1 +../testclient unix:socket -c 1 '@attr 1=/sgml/tag inside' >> $LOG || exit 1 +../testclient unix:socket -c 0 '@attr 1=/sgml/tag after' >> $LOG || exit 1 + +../testclient unix:socket -c 0 '@attr 1=/sgml/none after' >> $LOG || exit 1 + +../testclient unix:socket -c 1 '@attr 1=/sgml before' >> $LOG || exit 1 +../testclient unix:socket -c 1 '@attr 1=/sgml inside' >> $LOG || exit 1 +../testclient unix:socket -c 1 '@attr 1=/sgml after' >> $LOG || exit 1 + +echo "killing server " >> $LOG +kill `cat zebrasrv.pid` || exit 3 +echo ok >> $LOG