23 lines
492 B
Bash
23 lines
492 B
Bash
#!/bin/sh
|
|
#
|
|
# $NetBSD: nattest,v 1.2 2000/06/12 13:35:54 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 -Nbr - -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
|