From: Junio C Hamano Date: Thu, 27 Apr 2023 18:47:41 GMT Subject: Re: [RFC PATCH 2/2] unit test: add basic example Message-ID: In-Reply-To: <20230427175007.902278-3-calvinwan@google.com> Calvin Wan writes: > Although this commit doesn't showcase unit tests running against > anything in Git, locally, I have a smaller set of Git files compiling > into a library with unit tests running against it using this C TAP > harness. > > However, you can run `make ctap` to get an idea of how the output looks > and use it as a baseline to play around with the other features of the > library. My aging eyes first read it as "make crap" ;-). Should we ove most of it to some other Makefile that lives in t/tap and keep it outside the primary Makefile? This is adding about half a dozen lines to support a sample unit-test.c file to be tested, and if we are going to have 200 of them would we add a thousand or more lines? As a technology demonstration, such a hello-world test may be fine, but I would have liked to see a more realistic sample that links with reasonably isolated part of Git codebase, perhaps testing say functions from . THanks.