test runner
This commit is contained in:
parent
87fb5da13d
commit
c499eceaa3
2 changed files with 16 additions and 1 deletions
2
makefile
2
makefile
|
|
@ -30,6 +30,6 @@ run: $(TARGET)
|
||||||
$(TARGET)
|
$(TARGET)
|
||||||
|
|
||||||
test: $(TARGET)
|
test: $(TARGET)
|
||||||
$(TARGET) --file test/lexer/1.in --dump-tokens
|
test/tester.sh
|
||||||
|
|
||||||
.PHONY: clean run test
|
.PHONY: clean run test
|
||||||
|
|
|
||||||
15
test/tester.sh
Executable file
15
test/tester.sh
Executable file
|
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
cd "$(dirname "$0")" # Change to script directory
|
||||||
|
|
||||||
|
for test in lexer/*.in; do
|
||||||
|
name=$(basename "$test" .in)
|
||||||
|
echo "Testing $name..."
|
||||||
|
|
||||||
|
if ! ../build/py2rb --dump-tokens < "$test" | diff - "lexer/${name}.out"; then
|
||||||
|
echo "FAILED: $name"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "SUCCESS: All tests passed"
|
||||||
Loading…
Add table
Add a link
Reference in a new issue