7fdd94ff8f8c5b89946a39a9e65b83a62dc92aa5
[idzebra-moved-to-github.git] / test / xpath / simple1.sh
1 # simple1.sh - test with one simple sgml record
2
3 LOG=simple1.log
4 ../../index/zebraidx -l $LOG init || exit 1
5 ../../index/zebraidx -l $LOG update simple1.rec || exit 1
6
7 echo "Starting server " >> $LOG
8 ../../index/zebrasrv -l $LOG -S unix:socket &
9 sleep 1
10 test -f zebrasrv.pid || exit 2
11
12 ../testclient unix:socket -c 0 '@attr 1=/sgml/tag before' >> $LOG || exit 1
13 ../testclient unix:socket -c 1 '@attr 1=/sgml/tag inside' >> $LOG || exit 1
14 ../testclient unix:socket -c 0 '@attr 1=/sgml/tag after'  >> $LOG || exit 1
15
16 ../testclient unix:socket -c 0 '@attr 1=/sgml/none after'  >> $LOG || exit 1
17
18 ../testclient unix:socket -c 1 '@attr 1=/sgml before' >> $LOG || exit 1
19 ../testclient unix:socket -c 1 '@attr 1=/sgml inside' >> $LOG || exit 1
20 ../testclient unix:socket -c 1 '@attr 1=/sgml after'  >> $LOG || exit 1
21
22 echo "killing server " >> $LOG
23 kill `cat zebrasrv.pid` || exit 3
24 echo ok >> $LOG