t0080: turn t-basic unit test into a helper
commit80bb227e41f462bb04f07991cb2bb531453820a5
authorJosh Steadmon <steadmon@google.com>
Mon, 6 May 2024 19:57:31 +0000 (6 12:57 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 6 May 2024 21:06:34 +0000 (6 14:06 -0700)
tree3f66354a98b56095f744c34131ebbf8537656fdb
parent483b759b47cc9d1624ae92bfa56d278a0b673bbd
t0080: turn t-basic unit test into a helper

While t/unit-tests/t-basic.c uses the unit-test framework added in
e137fe3b29 (unit tests: add TAP unit test framework, 2023-11-09), it is
not a true unit test in that it intentionally fails in order to exercise
various codepaths in the unit-test framework. Thus, we intentionally
exclude it when running unit tests through the various t/Makefile
targets. Instead, it is executed by t0080-unit-test-output.sh, which
verifies its output follows the TAP format expected for the various
pass, skip, or fail cases.

As such, it makes more sense for t-basic to be a helper item for
t0080-unit-test-output.sh, so let's move it to
t/helper/test-example-tap.c and adjust Makefiles as necessary.

Signed-off-by: Josh Steadmon <steadmon@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile
t/Makefile
t/helper/test-example-tap.c [moved from t/unit-tests/t-basic.c with 95% similarity]
t/helper/test-tool.c
t/helper/test-tool.h
t/t0080-unit-test-output.sh