2 # $Id: test4.sh,v 1.2 2004-06-15 08:06:35 adam Exp $
14 ../../index/zebraidx -c $pp/zebra.cfg -l $LOG init || exit 1
15 ../../index/zebraidx -c $pp/zebra.cfg -l $LOG -t grs.sgml update rec4.xml || exit 2
16 test -f dict*.mf || exit 1
17 ../../index/zebrasrv -c $pp/zebra.cfg -l $LOG -S unix:socket &
19 test -f zebrasrv.pid || exit 2
20 ../api/testclient unix:socket '@attr 1=/root content' >$TMP1
21 ../api/testclient unix:socket '@attr 1=/root/first content' >$TMP2
22 ../api/testclient unix:socket "@attr {1=/root/first[@attr='danish']} content" >$TMP3
23 ../api/testclient unix:socket "@attr {1=/root/second[@attr='danish lake']} content" >$TMP4
24 ../api/testclient unix:socket "@attr {1=/root/third[@attr='dansk sø']} content" >$TMP5
25 echo 'Killing server' >>$LOG
26 kill `cat zebrasrv.pid` || exit 3
27 cat $TMP1 $TMP2 $TMP3 $TMP4 $TMP5 >>$LOG
28 echo 'Checking that result count is 1' >>$LOG
29 grep "^Result count: 1$" $TMP1 >/dev/null || exit 4
30 echo 'Checking that result count is 1' >>$LOG
31 grep "^Result count: 1$" $TMP2 >/dev/null || exit 5
32 echo 'Checking that result count is 1' >>$LOG
33 grep "^Result count: 1$" $TMP3 >/dev/null || exit 6
34 echo 'Checking that result count is 1' >>$LOG
35 grep "^Result count: 1$" $TMP4 >/dev/null || exit 7
36 echo 'Checking that result count is 1' >>$LOG
37 grep "^Result count: 1$" $TMP5 >/dev/null || exit 8