Thread (139 messages) 139 messages, 5 authors, 2021-04-30

Re: [PATCH v3 03/30] subtree: t7900: use test-lib.sh's test_count

From: Luke Shumaker <hidden>
Date: 2021-04-30 16:10:06

On Fri, 30 Apr 2021 03:45:10 -0600,
Ævar Arnfjörð Bjarmason wrote:
On Tue, Apr 27 2021, Luke Shumaker wrote:
quoted
Use test-lib.sh's `test_count`, instead instead of having
t7900-subtree.sh do its own book-keeping with `subtree_test_count` that
has to be explicitly incremented by calling `next_test`.
This just retains an existing pattern and all that, but I think this
pattern of testing makes for hard to read & maintain tests. It looks
like all of these could just be:

    test_when_finished "rm -rf repo" &&
    git init repo &&
    [...]

I.e. the only thing that's being done here is to piggy-back on the test
count to create a unique repo.
Thanks for the tip, I'll do that for any new tests I add, going
forward.

-- 
Happy hacking,
~ Luke Shumaker
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help