wuz/tests/run.sh

37 lines
455 B
Bash
Raw Normal View History

2023-08-23 12:40:43 +00:00
#!/bin/sh
OK=0
KO=0
echo -e "\e[34m=== Unit Testing ===\e[0m"
for file in $(find . -name "test_*.wuz")
2023-08-23 12:40:43 +00:00
do
wuz $file
RES="$?"
echo -n "$file ... "
if [ "$RES" == "0" ]
then
echo -e "\e[32mok\e[0m"
OK=$(($OK + 1))
else
echo -e "\e[31mko\e[0m"
KO=$(($KO+1))
fi
done
TOTAL=$(($OK+$KO))
if [ $KO -eq 0 ]
then
echo -e "\e[32mAll tests passed [$TOTAL]\e[0m"
else
echo -e "\e[31m$KO tests failed [$TOTAL]\e[0m"
fi
echo
./errors.sh