]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t5315: use test_path_is_file for loose-object check
authorBilal El Khatabi <elkhatabibilal@gmail.com>
Thu, 19 Mar 2026 18:06:52 +0000 (18:06 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 19 Mar 2026 18:58:18 +0000 (11:58 -0700)
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>
t/t5315-pack-objects-compression.sh

index 8bacd96275b0ac881b9202ecaff83394ca562dd2..d0feab17b4cc54d48c75a0bec2734e8343fb5e0f 100755 (executable)
@@ -10,7 +10,7 @@ test_expect_success setup '
        # make sure it resulted in a loose object
        ob=$(sed -e "s/\(..\).*/\1/" object-name) &&
        ject=$(sed -e "s/..\(.*\)/\1/" object-name) &&
-       test -f .git/objects/$ob/$ject
+       test_path_is_file .git/objects/$ob/$ject
 '
 
 while read expect config