]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t/pack-refs-tests: move the 'test_done' to callees
authorKarthik Nayak <karthik.188@gmail.com>
Mon, 20 Oct 2025 08:18:31 +0000 (10:18 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 4 Nov 2025 15:35:12 +0000 (07:35 -0800)
In ac0bad0af4 (t0601: refactor tests to be shareable, 2025-09-19), we
refactored 't/t0601-reffiles-pack-refs.sh' to move all of the tests to
't/pack-refs-tests.sh', which became a common test suite which was also
used by 't/t1463-refs-optimize.sh'.

This also moved the 'test_done' directive to 't/pack-refs-tests.sh'.
Which inhibits additional tests from being added to either of the tests.
Let's move the directive out to both the tests, so that we can add
additional specific tests to them. Also the test flow logic shouldn't be
part of tests which can be embedded in other test scripts.

Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/pack-refs-tests.sh
t/t0601-reffiles-pack-refs.sh
t/t1463-refs-optimize.sh

index 095823d915fd637e6212497566d3a76544d96caf..81086c369089b9dd77547d90cf3eea45469224c2 100644 (file)
@@ -459,5 +459,3 @@ test_expect_success 'pack-refs does not store invalid peeled tag value' '
                test_grep ! "^\^" .git/packed-refs
        )
 '
-
-test_done
index 12cf5d1dcba814ffe1a9d1baed41e9dbf7ba6e79..3c706978efc2197c6d1bc19c4a8982f77f1b0690 100755 (executable)
@@ -18,3 +18,5 @@ export GIT_TEST_DEFAULT_REF_FORMAT
 . ./test-lib.sh
 
 . "$TEST_DIRECTORY"/pack-refs-tests.sh
+
+test_done
index c11c905d795d26b536d8f66c2807d172f54578a0..9afe3c1ed7e33ad3a7e190c2c7dca1dfbc8ed756 100755 (executable)
@@ -15,3 +15,5 @@ export GIT_TEST_DEFAULT_REF_FORMAT
 
 pack_refs='refs optimize'
 . "$TEST_DIRECTORY"/pack-refs-tests.sh
+
+test_done