mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
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>
This commit is contained in:
committed by
Junio C Hamano
parent
f93ff170b9
commit
f1cc562b77
@@ -52,12 +52,12 @@ test_expect_success 'merge c1 with c2, c3, c4, c5' '
|
|||||||
test "$(git rev-parse c3)" = "$(git rev-parse HEAD^3)" &&
|
test "$(git rev-parse c3)" = "$(git rev-parse HEAD^3)" &&
|
||||||
test "$(git rev-parse c5)" = "$(git rev-parse HEAD^4)" &&
|
test "$(git rev-parse c5)" = "$(git rev-parse HEAD^4)" &&
|
||||||
git diff --exit-code &&
|
git diff --exit-code &&
|
||||||
test -f c0.c &&
|
test_path_is_file c0.c &&
|
||||||
test -f c1.c &&
|
test_path_is_file c1.c &&
|
||||||
test -f c2.c &&
|
test_path_is_file c2.c &&
|
||||||
test -f c3.c &&
|
test_path_is_file c3.c &&
|
||||||
test -f c4.c &&
|
test_path_is_file c4.c &&
|
||||||
test -f c5.c &&
|
test_path_is_file c5.c &&
|
||||||
git show --format=%s -s >actual &&
|
git show --format=%s -s >actual &&
|
||||||
! grep c1 actual &&
|
! grep c1 actual &&
|
||||||
grep c2 actual &&
|
grep c2 actual &&
|
||||||
@@ -75,12 +75,12 @@ test_expect_success 'pull c2, c3, c4, c5 into c1' '
|
|||||||
test "$(git rev-parse c3)" = "$(git rev-parse HEAD^3)" &&
|
test "$(git rev-parse c3)" = "$(git rev-parse HEAD^3)" &&
|
||||||
test "$(git rev-parse c5)" = "$(git rev-parse HEAD^4)" &&
|
test "$(git rev-parse c5)" = "$(git rev-parse HEAD^4)" &&
|
||||||
git diff --exit-code &&
|
git diff --exit-code &&
|
||||||
test -f c0.c &&
|
test_path_is_file c0.c &&
|
||||||
test -f c1.c &&
|
test_path_is_file c1.c &&
|
||||||
test -f c2.c &&
|
test_path_is_file c2.c &&
|
||||||
test -f c3.c &&
|
test_path_is_file c3.c &&
|
||||||
test -f c4.c &&
|
test_path_is_file c4.c &&
|
||||||
test -f c5.c &&
|
test_path_is_file c5.c &&
|
||||||
git show --format=%s -s >actual &&
|
git show --format=%s -s >actual &&
|
||||||
! grep c1 actual &&
|
! grep c1 actual &&
|
||||||
grep c2 actual &&
|
grep c2 actual &&
|
||||||
|
|||||||
Reference in New Issue
Block a user