2023-08-23 15:25:28 +00:00
|
|
|
#!/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
|
2023-08-23 20:16:53 +00:00
|
|
|
echo "$line" | wuz &> /dev/null
|
2023-08-23 15:25:28 +00:00
|
|
|
RET="$?"
|
2023-08-23 20:16:53 +00:00
|
|
|
if [ "$RET" != "0" ] || [ "$line" == "" ]
|
2023-08-23 15:25:28 +00:00
|
|
|
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
|
|
|
|
|