Skip to content

Commit 1d6fd6d

Browse files
bilalobegitster
authored andcommitted
t5315: use test_path_is_file for loose-object check
Use test_path_is_file instead of test -f when checking that the loose object was written to the expected path. This uses Git's path-checking helper, which provides more specific failure output than a raw test -f check. Signed-off-by: Bilal El Khatabi <elkhatabibilal@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 7ff1e8d commit 1d6fd6d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

t/t5315-pack-objects-compression.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ test_expect_success setup '
1010
# make sure it resulted in a loose object
1111
ob=$(sed -e "s/\(..\).*/\1/" object-name) &&
1212
ject=$(sed -e "s/..\(.*\)/\1/" object-name) &&
13-
test -f .git/objects/$ob/$ject
13+
test_path_is_file .git/objects/$ob/$ject
1414
'
1515

1616
while read expect config

0 commit comments

Comments
 (0)