t5301: use test_path_is_file instead of test -f

Replace raw 'test -f' assertions with the 'test_path_is_file' helper,
which gives diagnostic output when the assertion fails.

Signed-off-by: Roger Koranteng <rogerkorantenng@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Roger Koranteng authored and Junio C Hamano committed 2026-10-20 12:26:50 -07:00
1 parent 47fdf2208c
commit 071f2e36bc
1 file changed
+2 -2
+2 -2
View File
@@ -22,7 +22,7 @@ test_expect_success 'setup' '
git repack -a -d &&
test "$(git count-objects)" = "0 objects, 0 kilobytes" &&
pack1=$(ls .git/objects/pack/*.pack) &&
test -f "$pack1"
test_path_is_file "$pack1"
'
test_expect_success 'verify-pack -v, defaults' '
@@ -48,7 +48,7 @@ test_expect_success 'repack -a -d, packedGit{WindowSize,Limit} == 1 page' '
git repack -a -d &&
test "$(git count-objects)" = "0 objects, 0 kilobytes" &&
pack2=$(ls .git/objects/pack/*.pack) &&
test -f "$pack2" &&
test_path_is_file "$pack2" &&
test "$pack1" \!= "$pack2"
'