23 lines
469 B
Bash
23 lines
469 B
Bash
#!/bin/sh
|
|
#
|
|
# $NetBSD: hextest,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 - -Hi $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
|