#!/bin/sh
+# $Id: tstcql.sh,v 1.4 2004-11-16 22:44:31 adam Exp $
+srcdir=${srcdir:-.}
oIFS="$IFS"
IFS='
'
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
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
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
fi
if diff $ERR1 $ERR2 >$DIFF; then
rm $DIFF
+ rm $ERR2
else
echo "diff err $secno $testno $f"
cat $DIFF