2016-01-27 17:26:32 -08:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
rm -rf /tmp/rufunge
|
|
|
|
mkdir /tmp/rufunge
|
2016-02-21 16:09:46 -08:00
|
|
|
mkdir /tmp/rufunge/examples
|
2016-01-27 17:26:32 -08:00
|
|
|
|
2016-02-21 16:09:46 -08:00
|
|
|
for name in examples/*.rf; do
|
2016-01-27 17:26:32 -08:00
|
|
|
./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"
|
2016-01-27 17:26:32 -08:00
|
|
|
exit -1
|
|
|
|
fi
|
|
|
|
done
|
2016-02-21 13:33:47 -08:00
|
|
|
|
|
|
|
/bin/echo -e "\e[1;32mAll Tests Passed\e[0m"
|