rufunge/test.sh

22 lines
409 B
Bash
Raw Normal View History

#!/bin/bash
rm -rf /tmp/rufunge
mkdir /tmp/rufunge
mkdir /tmp/rufunge/examples
for name in examples/*.rf; do
./bin/a $name > /tmp/rufunge/$name.txt
echo Result for $name:
cat /tmp/rufunge/$name.txt
if cmp --silent $name.txt /tmp/rufunge/$name.txt; then
echo "Test passed: $name"
else
2016-02-21 13:33:47 -08:00
/bin/echo -e "\e[1;31mTest failed: $name\e[0m"
exit -1
fi
done
2016-02-21 13:33:47 -08:00
/bin/echo -e "\e[1;32mAll Tests Passed\e[0m"