aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2021-08-28 14:26:32 -0700
committerBruce Hill <bruce@bruce-hill.com>2021-08-28 14:26:32 -0700
commit16bf40bd649ba065a7a0a6008c8434335ffae55a (patch)
tree526af942dedd9e6198035d2628a089c61541aee0 /Makefile
parent9db5e91781b71939fd3cd9dd0e8e922e7d52e449 (diff)
Added tests/tutorial
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 10 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index f5eb960..71d9b80 100644
--- a/Makefile
+++ b/Makefile
@@ -43,8 +43,15 @@ clean:
rm -f $(NAME) $(OBJFILES)
test: $(NAME)
- ./$(NAME) Comment -r '[@0]'
- ./$(NAME) -g ./grammars/bp.bp -p Grammar ./grammars/bp.bp
+ ./$(NAME) Comment -r '[@0]' >/dev/null
+ ./$(NAME) -g ./grammars/bp.bp -p Grammar ./grammars/bp.bp >/dev/null
+ for test in tests/*.sh; do \
+ sh "$$test" <"$${test/.sh/.in}" | diff -q - "$${test/.sh/.out}" ||\
+ sh "$$test" <"$${test/.sh/.in}" | diff -y --color=always - "$${test/.sh/.out}"; \
+ done
+
+tutorial:
+ ./tutorial.sh
leaktest: bp
valgrind --leak-check=full ./bp -l -g ./grammars/bp.bp -p Grammar ./grammars/bp.bp
@@ -74,4 +81,4 @@ uninstall:
[ "$$confirm" != n ] && rm -rf ~/.config/$(NAME); \
fi
-.PHONY: all clean install uninstall leaktest splint test
+.PHONY: all clean install uninstall leaktest splint test tutorial