From 4763d97a4c0440b1c7bf53296049b66b4b10b15a Mon Sep 17 00:00:00 2001 From: girst Date: Sun, 1 Apr 2018 01:02:03 +0200 Subject: [PATCH] add `make test' --- Makefile | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0f953e6..225c6c5 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: all clean run +.PHONY: all clean run test all: 2017mines 2017mines: mines_2017.c schemes.h @@ -9,3 +9,16 @@ run: 2017mines clean: rm -f 2017mines + +define TESTS + echo -e '\033[7mTODOs:\033[0m' + grep -ni --color=always 'xxx\|note\|warn\|todo\|[^:]\/\/' mines_2017.c schemes.h + + echo -e '\n\033[7m>80:\033[0m' + for myFILE in mines_2017.c schemes.h + do sed 's/\t/ /g' < $$myFILE|grep -En --color=always '.{81}'|sed "s/^/\x1B[35m$$myFILE:/" + done +endef +export TESTS +test: + sh -c "$$TESTS" |& less --RAW-CONTROL-CHARS --chop-long-lines -- 2.39.3