Makefile updates for Automake 1.5+. Test script updates
[idzebra-moved-to-github.git] / test / xpath / test2.sh
1 #!/bin/sh
2 # $Id: test2.sh,v 1.3 2003-05-21 14:39:23 adam Exp $
3 LOG=test2.log
4 TMP=test2.tmp
5 rm -f $LOG
6 rm -f $TMP
7 ../../index/zebraidx -l $LOG init || exit 1
8 ../../index/zebraidx -l $LOG -t grs.sgml update rec.xml || exit 2
9 test -f dict*.mf || exit 1
10 ../../index/zebrasrv -l $LOG -S unix:socket & 
11 sleep 1
12 test -f zebrasrv.pid || exit 2
13 ../api/testclient unix:socket '@attr 1=/Zthes/termName Sauropoda' >$TMP
14 echo 'Killing server' >>$LOG
15 kill `cat zebrasrv.pid` || exit 3
16 cat $TMP >>$LOG
17 echo 'Checking that result count is 1' >>$LOG
18 grep "^Result count: 1$" $TMP >/dev/null || exit 4
19 echo 'Test OK' >>$LOG
20