From 4ed7a26e63a0a8f537743b3c4c083c85fee4325a Mon Sep 17 00:00:00 2001 From: Heikki Levanto Date: Mon, 11 Nov 2002 15:40:56 +0000 Subject: [PATCH] A simple test with *one* sgml record --- test/xpath/Makefile.am | 3 ++- test/xpath/simple1.rec | 9 +++++++++ test/xpath/simple1.sh | 24 ++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 test/xpath/simple1.rec create mode 100755 test/xpath/simple1.sh 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 -- 1.7.10.4