From 62af09d3a402d4edfbde306941601a978dfb45a0 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 6 Feb 2006 13:19:55 +0000 Subject: [PATCH] Test case for bug 460 --- test/marcxml/record.abs | 3 ++- test/marcxml/test1.sh | 18 +++++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/test/marcxml/record.abs b/test/marcxml/record.abs index dba412c..b145558 100644 --- a/test/marcxml/record.abs +++ b/test/marcxml/record.abs @@ -1,4 +1,4 @@ -# $Id: record.abs,v 1.3.2.2 2006-01-23 10:34:45 adam Exp $ +# $Id: record.abs,v 1.3.2.3 2006-02-06 13:19:55 adam Exp $ name marcxml attset bib1.att @@ -10,6 +10,7 @@ marc usmarc.mar xpath disable +#melm 010$a identifier-standard,identifier-standard:p xelm /record/controlfield[@tag="001"] Material-type:w:range(data,3,1) xelm /record/controlfield[@tag="008"] Code-Language:w xelm /record/datafield[@tag="100"]/subfield[@code="a"] author:w,author:s diff --git a/test/marcxml/test1.sh b/test/marcxml/test1.sh index a113647..f4d5fb1 100755 --- a/test/marcxml/test1.sh +++ b/test/marcxml/test1.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: test1.sh,v 1.4.2.1 2004-08-24 14:06:32 adam Exp $ +# $Id: test1.sh,v 1.4.2.2 2006-02-06 13:19:55 adam Exp $ pp=${srcdir:-"."} @@ -12,11 +12,19 @@ if ../../index/zebraidx -c $pp/zebra.cfg -l $LOG -V|grep Expat >/dev/null; then else exit 0 fi -../../index/zebraidx -c $pp/zebra.cfg -l $LOG $DBG update $pp/m*.xml -../../index/zebrasrv -c $pp/zebra.cfg -l $LOG $DBG unix:socket & +../../index/zebraidx -c $pp/zebra.cfg -l $LOG init +../../index/zebraidx -c $pp/zebra.cfg -l $LOG update $pp/m*.xml +../../index/zebrasrv -c $pp/zebra.cfg -l $LOG unix:socket & +ret=0 sleep 1 ../api/testclient unix:socket '@and @attr 1=54 eng @and @attr 1=1003 jack @attr 1=4 computer' >tmp1 echo 'Result count: 2' >tmp2 -kill `cat zebrasrv.pid` || exit 1 -diff tmp1 tmp2 || exit 2 +diff tmp1 tmp2 || ret=1 +rm -f tmp1 tmp2 +# bug # 460 +../api/testclient unix:socket '@attr 1=1003 a' >tmp1 +echo 'Result count: 0' >tmp2 +diff tmp1 tmp2 || ret=1 rm -f tmp1 tmp2 +kill `cat zebrasrv.pid` || exit 1 +exit $ret -- 1.7.10.4