mirror of
https://github.com/git/git
synced 2024-10-28 19:25:47 +00:00
t5520: replace test -f with test-lib functions
Although `test -f` has the same functionality as test_path_is_file(), in the case where test_path_is_file() fails, we get much better debugging information. Replace `test -f` with test_path_is_file() so that future developers will have a better experience debugging these test cases. Also, in the case of `! test -f`, not only should that path not be a file, it shouldn't exist at all so replace it with test_path_is_missing(). Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
4c8b046f82
commit
ceeef863de
1 changed files with 5 additions and 5 deletions
|
@ -39,8 +39,8 @@ test_expect_success 'pulling into void' '
|
|||
cd cloned &&
|
||||
git pull ..
|
||||
) &&
|
||||
test -f file &&
|
||||
test -f cloned/file &&
|
||||
test_path_is_file file &&
|
||||
test_path_is_file cloned/file &&
|
||||
test_cmp file cloned/file
|
||||
'
|
||||
|
||||
|
@ -50,8 +50,8 @@ test_expect_success 'pulling into void using master:master' '
|
|||
cd cloned-uho &&
|
||||
git pull .. master:master
|
||||
) &&
|
||||
test -f file &&
|
||||
test -f cloned-uho/file &&
|
||||
test_path_is_file file &&
|
||||
test_path_is_file cloned-uho/file &&
|
||||
test_cmp file cloned-uho/file
|
||||
'
|
||||
|
||||
|
@ -99,7 +99,7 @@ test_expect_success 'pulling into void must not create an octopus' '
|
|||
(
|
||||
cd cloned-octopus &&
|
||||
test_must_fail git pull .. master master &&
|
||||
! test -f file
|
||||
test_path_is_missing file
|
||||
)
|
||||
'
|
||||
|
||||
|
|
Loading…
Reference in a new issue