mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-08 04:03:35 +08:00
Added Makefile and horrifying test framework
This commit is contained in:
19
test/runQuack
Executable file
19
test/runQuack
Executable 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
|
||||
|
Reference in New Issue
Block a user