Skip to content

Commit c113f4c

Browse files
KarthikNayakgitster
authored andcommitted
t/pack-refs-tests: move the 'test_done' to callees
In ac0bad0 (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>
1 parent 2cd99d9 commit c113f4c

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

t/pack-refs-tests.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,5 +459,3 @@ test_expect_success 'pack-refs does not store invalid peeled tag value' '
459459
test_grep ! "^\^" .git/packed-refs
460460
)
461461
'
462-
463-
test_done

t/t0601-reffiles-pack-refs.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@ export GIT_TEST_DEFAULT_REF_FORMAT
1818
. ./test-lib.sh
1919

2020
. "$TEST_DIRECTORY"/pack-refs-tests.sh
21+
22+
test_done

t/t1463-refs-optimize.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ export GIT_TEST_DEFAULT_REF_FORMAT
1515

1616
pack_refs='refs optimize'
1717
. "$TEST_DIRECTORY"/pack-refs-tests.sh
18+
19+
test_done

0 commit comments

Comments
 (0)