Skip to content

Commit

Permalink
add regression tests
Browse files Browse the repository at this point in the history
- check perl syntax
- run mandoc lint on man page
- check README.md is up to date
- check .Dd date in man page is accurate
  • Loading branch information
semarie committed Jun 19, 2017
1 parent 1882d04 commit 780e3fc
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,26 @@ realinstall:
README.md: sysclean.8
mandoc -T markdown sysclean.8 >$@

regress: run-regress-perl-syntax \
run-regress-man-lint \
run-regress-man-readme \
run-regress-man-date

run-regress-perl-syntax:
perl -c sysclean.pl

run-regress-man-lint:
mandoc -T lint sysclean.8

run-regress-man-readme:
mandoc -T markdown sysclean.8 | diff -q README.md -

run-regress-man-date:
if [ -d .git ]; then \
grep -qF -- \
"$$(date -r $$(git log -1 --format="%ct" sysclean.8) \
+'.Dd %B %d, %Y')" \
sysclean.8 ; \
fi

.include <bsd.prog.mk>

0 comments on commit 780e3fc

Please sign in to comment.