t7603: replace test -f by test_path_is_file

`test_path_is_file` provides a better output when asserting whether a file exists. Replace the occurrences of `test -f` in t7603 with it, facilitating the trace of possible test failures. Signed-off-by: Lucas Oshiro <lucasseikioshiro@gmail.com> Acked-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Lucas Oshiro committed Feb 8, 2025 at 13:57 UTC f1cc562b77053ced18eebaae2febe5ff6d5e2690
1 file changed +12 -12
t/t7603-merge-reduce-heads.sh
+12 -12
@@ -52,12 +52,12 @@ test_expect_success 'merge c1 with c2, c3, c4, c5' '
52 test "$(git rev-parse c3)" = "$(git rev-parse HEAD^3)" &&
53 test "$(git rev-parse c5)" = "$(git rev-parse HEAD^4)" &&
54 git diff --exit-code &&
55 - test -f c0.c &&
56 - test -f c1.c &&
57 - test -f c2.c &&
58 - test -f c3.c &&
59 - test -f c4.c &&
60 - test -f c5.c &&
55 + test_path_is_file c0.c &&
56 + test_path_is_file c1.c &&
57 + test_path_is_file c2.c &&
58 + test_path_is_file c3.c &&
59 + test_path_is_file c4.c &&
60 + test_path_is_file c5.c &&
61 git show --format=%s -s >actual &&
62 ! grep c1 actual &&
63 grep c2 actual &&
@@ -75,12 +75,12 @@ test_expect_success 'pull c2, c3, c4, c5 into c1' '
75 test "$(git rev-parse c3)" = "$(git rev-parse HEAD^3)" &&
76 test "$(git rev-parse c5)" = "$(git rev-parse HEAD^4)" &&
77 git diff --exit-code &&
78 - test -f c0.c &&
79 - test -f c1.c &&
80 - test -f c2.c &&
81 - test -f c3.c &&
82 - test -f c4.c &&
83 - test -f c5.c &&
78 + test_path_is_file c0.c &&
79 + test_path_is_file c1.c &&
80 + test_path_is_file c2.c &&
81 + test_path_is_file c3.c &&
82 + test_path_is_file c4.c &&
83 + test_path_is_file c5.c &&
84 git show --format=%s -s >actual &&
85 ! grep c1 actual &&
86 grep c2 actual &&