Version 1.3.50.
[idzebra-moved-to-github.git] / test / marcxml / test1.sh
1 #!/bin/sh
2 # $Id: test1.sh,v 1.4.2.2 2006-02-06 13:19:55 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 init
16 ../../index/zebraidx -c $pp/zebra.cfg -l $LOG update $pp/m*.xml
17 ../../index/zebrasrv -c $pp/zebra.cfg -l $LOG unix:socket &
18 ret=0
19 sleep 1
20 ../api/testclient unix:socket '@and @attr 1=54 eng @and @attr 1=1003 jack @attr 1=4 computer' >tmp1
21 echo 'Result count: 2' >tmp2
22 diff tmp1 tmp2 || ret=1
23 rm -f tmp1 tmp2
24 # bug # 460
25 ../api/testclient unix:socket '@attr 1=1003 a' >tmp1
26 echo 'Result count: 0' >tmp2
27 diff tmp1 tmp2 || ret=1
28 rm -f tmp1 tmp2
29 kill `cat zebrasrv.pid` || exit 1
30 exit $ret