Added Makefile and horrifying test framework

This commit is contained in:
Vidar Holen
2012-11-04 20:29:21 -08:00
parent 4557f4acd3
commit c6a05179e0
3 changed files with 95 additions and 0 deletions

19
test/runQuack Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/bash
# Todo: Find a way to make this not suck.
[[ -e test/quackCheck.hs ]] || { echo "Are you running me from the wrong directory?"; exit 1; }
find . -name '*.hs' -exec bash -c '
grep -v "^module " "$1" > quack.tmp.hs
./test/quackCheck.hs +names quack.tmp.hs
' -- {} \; 2>&1 | grep -i FAIL
result=$?
rm -f quack.tmp.hs hugsin
if [[ $result == 0 ]]
then
exit 1
else
exit 0
fi