Makefile updates for Automake 1.5+. Test script updates
[idzebra-moved-to-github.git] / test / xpath / simple1.sh
1 #!/bin/sh
2 # $Id: simple1.sh,v 1.3 2003-05-21 14:39:23 adam Exp $
3 # test with one simple sgml record
4
5 LOG=simple1.log
6 ../../index/zebraidx -l $LOG init || exit 1
7 ../../index/zebraidx -l $LOG update simple1.xml || exit 1
8
9 echo "Starting server " >> $LOG
10 ../../index/zebrasrv -l $LOG -S unix:socket &
11 sleep 1
12 test -f zebrasrv.pid || exit 2
13
14 ../api/testclient unix:socket -c 0 '@attr 1=/sgml/tag before' >> $LOG || exit 1
15 ../api/testclient unix:socket -c 1 '@attr 1=/sgml/tag inside' >> $LOG || exit 1
16 ../api/testclient unix:socket -c 0 '@attr 1=/sgml/tag after'  >> $LOG || exit 1
17
18 ../api/testclient unix:socket -c 0 '@attr 1=/sgml/none after'  >> $LOG || exit 1
19
20 ../api/testclient unix:socket -c 1 '@attr 1=/sgml before' >> $LOG || exit 1
21 ../api/testclient unix:socket -c 1 '@attr 1=/sgml inside' >> $LOG || exit 1
22 ../api/testclient unix:socket -c 1 '@attr 1=/sgml after'  >> $LOG || exit 1
23
24 echo "killing server " >> $LOG
25 kill `cat zebrasrv.pid` || exit 3
26 echo ok >> $LOG