diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2021-08-28 14:26:32 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2021-08-28 14:26:32 -0700 |
| commit | 16bf40bd649ba065a7a0a6008c8434335ffae55a (patch) | |
| tree | 526af942dedd9e6198035d2628a089c61541aee0 /Makefile | |
| parent | 9db5e91781b71939fd3cd9dd0e8e922e7d52e449 (diff) | |
Added tests/tutorial
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -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 |
