From: Adam Dickmeiss Date: Mon, 6 Feb 2006 23:11:12 +0000 (+0000) Subject: Added test7. bug 460 X-Git-Tag: ZEBRA.1.3.34~9 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=c4c93fae250ff372081adb7007b75a33e32ef0f0;p=idzebra-moved-to-github.git Added test7. bug 460 --- diff --git a/test/xpath/Makefile.am b/test/xpath/Makefile.am index a5caad0..a59f188 100644 --- a/test/xpath/Makefile.am +++ b/test/xpath/Makefile.am @@ -1,6 +1,7 @@ -# $Id: Makefile.am,v 1.7.2.1 2004-12-16 19:11:41 heikki Exp $ +# $Id: Makefile.am,v 1.7.2.2 2006-02-06 23:11:12 adam Exp $ -check_SCRIPTS = simple1.sh test1.sh test2.sh test3.sh test4.sh test5.sh test6.sh +check_SCRIPTS = simple1.sh \ + test1.sh test2.sh test3.sh test4.sh test5.sh test6.sh test7.sh TESTS = $(check_SCRIPTS) diff --git a/test/xpath/assembled.abs b/test/xpath/assembled.abs index 8b5acb5..b36af9b 100644 --- a/test/xpath/assembled.abs +++ b/test/xpath/assembled.abs @@ -5,5 +5,9 @@ xpath enable # NAL-call-number=18, Title-key=33 xelm /assembled/basic/names/CASno !:w,!:p,!:s,NAL-call-number:p,Title-key:s +# bug 431 # Bib-level=1021 xelm /assembled/@org Bib-level:w,Bib-level:w + +# +xelm /assembled/basic Title:w diff --git a/test/xpath/test6.sh b/test/xpath/test6.sh index 0c9f5f0..003d4cf 100755 --- a/test/xpath/test6.sh +++ b/test/xpath/test6.sh @@ -1,11 +1,10 @@ #!/bin/sh -# $Id: test6.sh,v 1.1.2.2 2005-11-08 10:46:19 adam Exp $ +# $Id: test6.sh,v 1.1.2.3 2006-02-06 23:11:12 adam Exp $ pp=${srcdir:-"."} LOG="test6.log" TMP="test6.tmp" -#DBG="-v 1647" DBG="" rm -f $LOG @@ -30,6 +29,7 @@ test -f zebrasrv.pid || exit 2 ../api/testclient unix:socket '@and @attr 1=/assembled/orgs/org 46 @attr 5=1 @attr 6=3 @attr 4=1 @attr 1=/assembled/basic/names/CASno 367-93-1' >$TMP.5 +# bug 431 ../api/testclient unix:socket '@attr 1=1021 46' >$TMP.6 echo 'Killing server' >>$LOG diff --git a/test/xpath/test7.sh b/test/xpath/test7.sh new file mode 100755 index 0000000..25f2ca4 --- /dev/null +++ b/test/xpath/test7.sh @@ -0,0 +1,39 @@ +#!/bin/sh +# $Id: test7.sh,v 1.1.2.1 2006-02-06 23:11:12 adam Exp $ + +pp=${srcdir:-"."} + +LOG="test7.log" +TMP="test7.tmp" +DBG="" + +rm -f $LOG +rm -f $TMP.* +../../index/zebraidx -c $pp/zebra6.cfg -l $LOG init || exit 1 +../../index/zebraidx -c $pp/zebra6.cfg -l $LOG -t grs.xml update $pp/rec61.xml $pp/rec62.xml || exit 2 +test -f dict*.mf || exit 1 + +../../index/zebrasrv -c $pp/zebra6.cfg -l $LOG $DBG -S unix:socket & +sleep 1 +test -f zebrasrv.pid || exit 2 + +# bug 460 +../api/testclient unix:socket '@attr 1=4 46' >$TMP.1 + +../api/testclient unix:socket '@attr 1=4 beta' >$TMP.2 + +echo 'Killing server' >>$LOG +kill `cat zebrasrv.pid` || exit 3 +sleep 1 +echo "Result counts: " >> $LOG +cat $TMP.* >>$LOG + +echo 'Checking that result 1 count is 0' >>$LOG +grep "^Result count: 0$" $TMP.1 >/dev/null || exit 4 + +echo 'Checking that result 2 count is 1' >>$LOG +grep "^Result count: 1$" $TMP.2 >/dev/null || exit 5 + +echo 'Test OK' >>$LOG +exit 0 +