X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=test%2Ftstcql.sh;h=bd8a4369e87749f75f2330dce850bd8d0393aa2e;hp=2f41abad854dddebae54544bcbd353ce3053d2a7;hb=471c6dccdbb5c5a9c08b24c9abd6a1dcda29e79e;hpb=42f18e58ed67f77727cde23bcee44dbd32ed242a diff --git a/test/tstcql.sh b/test/tstcql.sh index 2f41aba..bd8a436 100755 --- a/test/tstcql.sh +++ b/test/tstcql.sh @@ -1,4 +1,6 @@ #!/bin/sh +# $Id: tstcql.sh,v 1.4 2004-11-16 22:44:31 adam Exp $ +srcdir=${srcdir:-.} oIFS="$IFS" IFS=' ' @@ -6,7 +8,9 @@ secno=0 testno=0 comment=0 ecode=0 -for f in `cat cqlsample`; do +test -f ${srcdir}/cqlsample || exit 1 +test -d cql || mkdir cql +for f in `cat ${srcdir}/cqlsample`; do if echo $f | grep '^#' >/dev/null; then comment=1 else @@ -16,8 +20,8 @@ for f in `cat cqlsample`; do fi comment=0 testno=`expr $testno + 1` - OUT1=cql/$secno.$testno.out - ERR1=cql/$secno.$testno.err + OUT1=${srcdir}/cql/$secno.$testno.out + ERR1=${srcdir}/cql/$secno.$testno.err OUT2=cql/$secno.$testno.out.tmp ERR2=cql/$secno.$testno.err.tmp DIFF=cql/$secno.$testno.diff @@ -25,6 +29,7 @@ for f in `cat cqlsample`; do if test -f $OUT1 -a -f $ERR1; then if diff $OUT1 $OUT2 >$DIFF; then rm $DIFF + rm $OUT2 else echo "diff out $secno $testno $f" cat $DIFF @@ -32,6 +37,7 @@ for f in `cat cqlsample`; do fi if diff $ERR1 $ERR2 >$DIFF; then rm $DIFF + rm $ERR2 else echo "diff err $secno $testno $f" cat $DIFF