]> git.ipfire.org Git - thirdparty/git.git/commit
t604[236]: do not run setup in separate tests
authorElijah Newren <newren@gmail.com>
Tue, 22 Oct 2019 21:22:51 +0000 (21:22 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 23 Oct 2019 02:32:51 +0000 (11:32 +0900)
commitda1e295e008ba016eef008385afb2c20c7fc3ff8
tree1f66eae8cbfac4a0a378da5fb1cf2a91bbaa25ab
parent49b8133a9ece199a17db8bb2545202c6eac67485
t604[236]: do not run setup in separate tests

Transform the setup "tests" to setup functions, and have the actual
tests call the setup functions.  Advantages:

  * Should make life easier for people working with webby CI/PR builds
    who have to abuse mice (and their own index finger as well) in
    order to switch from viewing one testcase to another.  Sounds
    awful; hopefully this will improve things for them.

  * Improves re-runnability: any failed test in any of these three
    files can now be re-run in isolation, e.g.
       ./t6042* --ver --imm -x --run=21
    whereas before it would require two tests to be specified to the
    --run argument, the other needing to be picked out as the relevant
    setup test from one or two tests before.

  * Importantly, this still keeps the "setup" and "test" sections
    somewhat separate to make it easier for readers to discern what is
    just ancillary setup and what the intent of the test is.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t6042-merge-rename-corner-cases.sh
t/t6043-merge-rename-directories.sh
t/t6046-merge-skip-unneeded-updates.sh