let tests create directories
[idzebra-moved-to-github.git] / test / rusmarc / test1.sh
1 #!/bin/sh
2 # $Id: test1.sh,v 1.2 2004-03-09 18:52:37 adam Exp $
3 LOG=test1.log
4 rm -f $LOG
5 test -d tmp || mkdir tmp
6 test -d lock || mkdir lock
7 test -d register || mkdir register
8 ../../index/zebraidx -l$LOG init
9 ../../index/zebraidx -l$LOG update records/*marc
10 ../../index/zebrasrv -l$LOG unix:socket &
11 sleep 1
12 # search text located in first record 600 $a
13 # term is koi8-r encoded
14 ../api/testclient unix:socket '@attr 1=21 úÁÍÑÔÉÎ' >tmp1
15 echo 'Result count: 1' >tmp2
16 kill `cat lock/zebrasrv.pid` || exit 1
17 diff tmp1 tmp2 || exit 2
18 rm -f tmp1 tmp2