mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-12-11 05:36:09 +00:00
27 lines
457 B
Bash
Executable file
27 lines
457 B
Bash
Executable file
#! /bin/ksh
|
|
|
|
PATH=/usr/xpg4/bin:$PATH
|
|
|
|
npass=0
|
|
nfail=0
|
|
ntotal=0
|
|
|
|
for test in *.t; do
|
|
printf "%-20s " "$test"
|
|
filter=$(head -1 $test)
|
|
vars=$(tail -n +2 $test)
|
|
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"
|