23 lines
467 B
Bash
23 lines
467 B
Bash
#!/bin/sh
|
|
#
|
|
# $NetBSD: dotest,v 1.6 2000/06/12 13:35:52 veego Exp $
|
|
#
|
|
|
|
echo "$1...";
|
|
TESTDIR=$2;
|
|
[ -z "$2" ] && TESTDIR=$PWD'/../../../../dist/ipf/test';
|
|
/bin/cp /dev/null results/$1
|
|
( while read rule; do
|
|
echo "$rule" | ipftest -br - -i $TESTDIR/input/$1 >> results/$1;
|
|
if [ $? -ne 0 ] ; then
|
|
exit 1;
|
|
fi
|
|
echo "--------" >> results/$1
|
|
done ) < $TESTDIR/regress/$1
|
|
cmp $TESTDIR/expected/$1 results/$1
|
|
status=$?
|
|
if [ $status = 0 ] ; then
|
|
touch $1
|
|
fi
|
|
exit $status
|