Major cleanup of the base IPFilter:
[dragonfly.git] / contrib / ipfilter / test / mtest
1 #!/bin/sh
2 # multiple rules at the same time
3
4 if [ -f /usr/ucb/touch ] ; then
5         TOUCH=/usr/ucb/touch
6 else
7         if [ -f /usr/bin/touch ] ; then
8                 TOUCH=/usr/bin/touch
9         else
10                 if [ -f /bin/touch ] ; then
11                         TOUCH=/bin/touch
12                 fi
13         fi
14 fi
15 echo "$1...";
16
17 /bin/cp /dev/null results/$1
18
19 ipftest -br regress/$1 -i input/$1 > results/$1
20 if [ $? -ne 0 ] ; then
21         exit 1
22 fi
23 echo "--------" >> results/$1
24
25 cmp expected/$1 results/$1
26 status=$?
27 if [ $status -ne 0 ] ; then
28         exit $status
29 fi
30 cmp expected/$1 results/$1
31 status=$?
32 if [ $status -ne 0 ] ; then
33         exit $status
34 fi
35 $TOUCH $1
36 exit 0