]> git.ipfire.org Git - thirdparty/git.git/commit
describe tests: fix nested "test_expect_success" call
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Mon, 12 Apr 2021 11:21:46 +0000 (13:21 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 11 May 2021 03:48:09 +0000 (12:48 +0900)
commit33b4ae11146ba0c468176d238d231e1101ba19cd
treedaaacd66d304d7baf7b26cda1f630cf0c746d5f5
parent7f07c1cdb7f46d2b0ec4468a90da7a4d697d2978
describe tests: fix nested "test_expect_success" call

Fix a nested invocation of "test_expect_success", the
"check_describe()" function is a wrapper for calling
test_expect_success, and therefore needs to be called outside the body
of another "test_expect_success".

The two tests added in 30b1c7ad9d6 (describe: don't abort too early
when searching tags, 2020-02-26) were not testing for anything due to
this logic error. Without this fix reverting the C code changes in
that commit still has all tests passing, with this fix we're actually
testing the "describe" output. This is because "test_expect_success"
calls "test_finish_", whose last statement happens to be true.

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