7921101512193d4a65304b3e246e19b8e13c6d25
[idzebra-moved-to-github.git] / test / marcxml / test1.sh
1 #!/bin/sh
2 # $Id: test1.sh,v 1.5 2004-08-24 14:29:09 adam Exp $
3
4 pp=${srcdir:-"."}
5
6 LOG=test1.log
7 DBG="-v 1647"
8
9 rm -f $LOG
10 if ../../index/zebraidx -c $pp/zebra.cfg -l $LOG -V|grep Expat >/dev/null; then
11         ../../index/zebraidx -c $pp/zebra.cfg -l $LOG $DBG init
12 else
13         exit 0
14 fi
15 ../../index/zebraidx -c $pp/zebra.cfg -l $LOG $DBG update $pp/m*.xml
16 ../../index/zebrasrv -c $pp/zebra.cfg -l $LOG $DBG unix:socket &
17 sleep 1
18 ../api/testclient unix:socket '@and @attr 1=54 eng @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