aboutsummaryrefslogtreecommitdiff
path: root/interpreter/Makefile
diff options
context:
space:
mode:
authorDrahflow <drahflow@gmx.de>2012-12-30 14:01:26 +0100
committerDrahflow <drahflow@gmx.de>2012-12-30 14:01:26 +0100
commitd74d19aee738ba60f584899e9530e9aa98845be2 (patch)
tree23e0ada97b5ca5f587dd2369d5d230ed055d3f2a /interpreter/Makefile
parentd0eccb26da64c6fce524fe14a390c4e4c629ee2d (diff)
Tests
Diffstat (limited to 'interpreter/Makefile')
-rw-r--r--interpreter/Makefile22
1 files changed, 22 insertions, 0 deletions
diff --git a/interpreter/Makefile b/interpreter/Makefile
new file mode 100644
index 0000000..278a9b0
--- /dev/null
+++ b/interpreter/Makefile
@@ -0,0 +1,22 @@
+.PHONY: test
+
+test:
+ for f in $$(ls ../examples/working); do \
+ printf "%20s: " $$f; \
+ echo Input | ( cd ../examples/working; ../../interpreter/elymas "$$f"; echo ) \
+ 2> "test/$$f.err.test" > "test/$$f.test"; \
+ if diff "test/$$f.test" "test/$$f.correct" && diff "test/$$f.err.test" "test/$$f.err.correct"; then \
+ echo "Success."; \
+ else \
+ echo "Failed."; \
+ fi \
+ done
+
+generate-test:
+ mkdir -p test
+ for f in $$(ls ../examples/working); do \
+ echo $$f; \
+ echo Input | ( cd ../examples/working; ../../interpreter/elymas "$$f"; echo ) \
+ 2> "test/$$f.err.correct" | tee "test/$$f.correct"; \
+ sleep 1; \
+ done