Test framework take two.
PATCH 1/2 Test framework take two.
Petr Baudis raised many valid points at the earlier attempts in git mailing list. This round, test-lib.sh has beenupdated to a bit more modern style, and the default output is made easier to read. Also included is one sample test script that tests the very basics. This test has already found one leftover bug missed when we introduced symlink support, which has been fixed since then. The supplied Makefile is designed to run all the available tests.
Signed-off-by Junio C Hamano <[email protected]>
---
t/Makefile | 15 ++++ t/t0000-basic.sh | 179 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ t/test-lib.sh | 142 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 336 insertions(+)
t/Makefile (. --> 100644)t/t0000-basic.sh (. --> 100755)t/test-lib.sh (. --> 100755)
t/Makefile +15 -0
@@ -0,0 +1,15 @@ +# Run tests +# +# Copyright (c) 2005 Junio C Hamano +# +#OPTS=--verbose --debug +OPTS= + +T = $(wildcard t[0-9][0-9][0-9][0-9]-*.sh) + +all:: + @$(foreach t,$T,echo "*** $t ***"; sh $t $(OPTS) || exit; ) + rm -fr trash + +clean:: + rm -fr trash
t/t0000-basic.sh +179 -0
179 lines not on this page · raw message
t/test-lib.sh +142 -0
142 lines not on this page · raw message
------------------------------------------------