ASCIIsite/tests/test.sh
gabe 80d510a282 made auto-tester script.
tests against a known compiled file.
2022-01-09 22:52:39 -06:00

16 lines
458 B
Bash

rm -r result
../ASCIIsite.py --verbose --output result --exclude-file globignore test
#find the sha1sum of the output
cd result
result=$(find . -type f -print0 | xargs -0 -P0 -n1 md5sum | sort -k 2 | md5sum)
cd ../control
control=$(find . -type f -print0 | xargs -0 -P0 -n1 md5sum | sort -k 2 | md5sum)
cd ../
echo result sum is $result
echo control sum is $control
if [ "$result" = "$control" ]; then
echo test passed!
else
echo test did not pass!!!!!
fi