ADD: test script.
parent
5fe53355b5
commit
3eefed351c
|
@ -0,0 +1,38 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
TOTAL=0
|
||||||
|
SUCCESS=0
|
||||||
|
|
||||||
|
for file in $(find -name "*.fk")
|
||||||
|
do
|
||||||
|
MSG=$(fakir "$file" 2>&1 > /dev/null)
|
||||||
|
RES=$?
|
||||||
|
|
||||||
|
NAME=$(basename -s ".fk" $file)
|
||||||
|
|
||||||
|
echo -en "\e[34m$NAME ... \e[0m"
|
||||||
|
|
||||||
|
if [ $RES -eq 0 ]
|
||||||
|
then
|
||||||
|
echo -e "\e[32mok\e[0m"
|
||||||
|
SUCCESS=$(($SUCCESS + 1))
|
||||||
|
else
|
||||||
|
echo -e "\e[31mko\e[0m"
|
||||||
|
echo "$MSG"
|
||||||
|
fi
|
||||||
|
|
||||||
|
TOTAL=$(($TOTAL + 1))
|
||||||
|
done
|
||||||
|
|
||||||
|
FAIL=$(($TOTAL - $SUCCESS))
|
||||||
|
|
||||||
|
if [ $TOTAL -eq $SUCCESS ]
|
||||||
|
then
|
||||||
|
echo -e "\e[32m======== All tests passed ========\e[0m"
|
||||||
|
else
|
||||||
|
echo -e "\e[31m======== Some tests failed ========\e[0m"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -e "\e[34msuccess\e[0m:\t$SUCCESS"
|
||||||
|
echo -e "\e[34mfailure\e[0m:\t$FAIL"
|
||||||
|
echo -e "\e[34mTOTAL\e[0m:\t\t$TOTAL"
|
Loading…
Reference in New Issue