2008-08-10 20:38:52 +00:00
|
|
|
#! /bin/ksh
|
|
|
|
|
2008-08-10 20:49:20 +00:00
|
|
|
PATH=/usr/xpg4/bin:$PATH
|
|
|
|
|
2008-08-10 20:38:52 +00:00
|
|
|
npass=0
|
|
|
|
nfail=0
|
|
|
|
ntotal=0
|
|
|
|
|
|
|
|
for test in *.t; do
|
2008-08-10 20:48:25 +00:00
|
|
|
printf "%-20s " "$test"
|
2008-08-10 20:38:52 +00:00
|
|
|
filter=$(head -1 $test)
|
2008-08-10 20:48:25 +00:00
|
|
|
vars=$(tail -n +2 $test)
|
2008-08-10 20:38:52 +00:00
|
|
|
expect=$(cat ${test%.t}.r)
|
|
|
|
result=$(../maketest "$filter" $vars | (cd ..; ./af_parser))
|
|
|
|
if [ "$expect" = "$result" ]; then
|
|
|
|
echo ...ok
|
|
|
|
npass=$((npass + 1))
|
|
|
|
else
|
|
|
|
echo ...FAIL
|
|
|
|
nfail=$((nfail + 1))
|
|
|
|
fi
|
|
|
|
|
|
|
|
ntotal=$((ntotal + 1))
|
|
|
|
done
|
|
|
|
|
|
|
|
echo "Ran $ntotal tests. PASS: $npass FAIL: $nfail"
|