Skip to content

Commit ac7c0a3

Browse files
committed
t0050: use explicit branch name and verify checkout result
The test 'checkout with no pathspec and a case insensitive fs' relies on the script-wide GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME to set the initial branch to 'main'. Use 'git init -b main' instead, so that the test is self-contained and does not depend on the blanket setting for the entire script. While at it, add a test_path_is_file check after the checkout to verify that the expected file is present in the worktree. Signed-off-by: Md Ferdous Alam <mdferdousalam1989@yahoo.com>
1 parent 7c02d39 commit ac7c0a3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

t/t0050-filesystem.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ $test_unicode 'merge (silent unicode normalization)' '
118118
'
119119

120120
test_expect_success CASE_INSENSITIVE_FS 'checkout with no pathspec and a case insensitive fs' '
121-
git init repo &&
121+
git init -b main repo &&
122122
(
123123
cd repo &&
124124
@@ -133,7 +133,8 @@ test_expect_success CASE_INSENSITIVE_FS 'checkout with no pathspec and a case in
133133
git add gitweb &&
134134
git commit -m "add gitweb/subdir/file" &&
135135
136-
git checkout main
136+
git checkout main &&
137+
test_path_is_file Gitweb
137138
)
138139
'
139140

0 commit comments

Comments
 (0)