37 lines
545 B
Bash
Executable File
37 lines
545 B
Bash
Executable File
#!/usr/bin/sh
|
|
OK=0
|
|
KO=0
|
|
COUNTER=0
|
|
LINE=1
|
|
|
|
echo -e "\e[34m=== Error Testing ===\e[0m"
|
|
|
|
for file in $(find . -name "err_*.wuz")
|
|
do
|
|
LINE=1
|
|
while read line;
|
|
do
|
|
echo "$line" | wuz &> /dev/null
|
|
RET="$?"
|
|
if [ "$RET" != "0" ] || [ "$line" == "" ]
|
|
then
|
|
OK=$(($OK+1))
|
|
else
|
|
KO=$(($KO+1))
|
|
echo -e "\e[33m\tE($file:$LINE) assertion failed\e[0m"
|
|
fi
|
|
|
|
COUNTER=$(($COUNTER + 1))
|
|
LINE=$(($LINE + 1))
|
|
done < $file
|
|
|
|
if [ "$KO" == "0" ]
|
|
then
|
|
echo -e "$file ... \e[32mok\e[0m"
|
|
else
|
|
echo -e "$file ... \e[31mko\e[0m"
|
|
fi
|
|
|
|
done
|
|
|