Cosmtic changes. No code change in actual code
[idzebra-moved-to-github.git] / test / marcxml / test2.sh
1 #!/bin/sh
2 # $Id: test2.sh,v 1.4 2004-09-27 10:44:51 adam Exp $
3
4 pp=${srcdir:-"."}
5
6 LOG=test2.log
7 rm -f $LOG
8
9 if ../../index/zebraidx -c $pp/zebra.cfg -l $LOG filters|grep grs.marcxml >/dev/null ; then
10         ../../index/zebraidx -c $pp/zebra.cfg -l $LOG $DBG init
11 else
12         exit 0
13 fi
14
15 ../../index/zebraidx -c $pp/zebra.cfg -l$LOG -t grs.marcxml.record update $pp/sample-marc
16 ../../index/zebrasrv -c $pp/zebra.cfg -l$LOG unix:socket &
17 sleep 1
18 ../api/testclient unix:socket '@and @attr 1=1003 jack @attr 1=4 computer' >tmp1
19 echo 'Result count: 2' >tmp2
20 kill `cat zebrasrv.pid` || exit 1
21 diff tmp1 tmp2 || exit 2
22 rm -f tmp1 tmp2