]> git.ipfire.org Git - thirdparty/git.git/commit
tests: use "test_stdout_line_count", not "test $(git [...] | wc -l)"
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Mon, 7 Mar 2022 12:48:53 +0000 (13:48 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 7 Mar 2022 21:27:39 +0000 (13:27 -0800)
commita182f69d5fb9fafead59eedbeb8a88a404ce3360
treefdaa4269b4f543282399991e9fbecf568896ff37
parentc4d1d526312a2dbe39c7997cb5a08cfce12f2427
tests: use "test_stdout_line_count", not "test $(git [...] | wc -l)"

Use the test_stdout_line_count helper added in
cdff1bb5a3d (test-lib-functions: introduce test_stdout_line_count,
2021-07-04) so that we'll spot if git itself dies, segfaults etc in
these expressions.

Because we didn't distinguish these failure conditions before I'd
mistakenly marked these tests as passing under SANITIZE=leak in
dd9cede9136 (leak tests: mark some rev-list tests as passing with
SANITIZE=leak, 2021-10-31).

While we're at it let's re-indent these lines to match our usual
style, as we're having to change all of them anyway.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t6005-rev-list-count.sh