Skip to content

Commit 24a49cf

Browse files
newrengitster
authored andcommitted
t2021: fix platform-specific leftover cruft
t2021.6 existed to test the status of a symlink that was left around by previous tests. It tried to also clean up the symlink after it was done so that subsequent tests wouldn't be tripped up by it. Unfortunately, since this test had a SYMLINK prerequisite, that made the cleanup platform dependent...and made a testcase I was trying to add to this testsuite fail (that testcase will be included in the next patch). Before we go and add new testcases, fix this cleanup by moving it into a separate test. Signed-off-by: Elijah Newren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 06dd2ba commit 24a49cf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

t/t2021-checkout-overwrite.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,13 @@ test_expect_success 'checkout commit with dir must not remove untracked a/b' '
5050

5151
test_expect_success SYMLINKS 'the symlink remained' '
5252
53-
test_when_finished "rm a/b" &&
5453
test -h a/b
5554
'
5655

56+
test_expect_success 'cleanup after previous symlink tests' '
57+
rm a/b
58+
'
59+
5760
test_expect_success SYMLINKS 'checkout -f must not follow symlinks when removing entries' '
5861
git checkout -f start &&
5962
mkdir dir &&

0 commit comments

Comments
 (0)