path: root/t/
diff options
authorElijah Newren <>2018-08-08 16:31:06 (GMT)
committerJunio C Hamano <>2018-08-08 17:52:55 (GMT)
commit7e9055bb0062fa7163b55b56fdc7532a04685862 (patch)
treebcbc5c006de357fb5ea26be1665d04493d54869e /t/
parent65799fbca72a251c75b087e7d018f367a4f7794f (diff)
t7406: prefer test_* helper functions to test -[feds]
test -e, test -s, etc. do not provide nice error messages when we hit test failures, so use the test_* helper functions from Also, add test_path_exists() to while at it, so that we don't need to worry whether submodule/.git is a file or a directory. It currently is a file with contents of the form gitdir: ../.git/modules/submodule but it could be changed in the future to be a directory; this test only really cares that it exists. Signed-off-by: Elijah Newren <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 't/')
1 files changed, 3 insertions, 3 deletions
diff --git a/t/ b/t/
index 2463863..24aa732 100755
--- a/t/
+++ b/t/
@@ -174,7 +174,7 @@ test_expect_success 'submodule update does not fetch already present commits' '
git submodule update > ../actual 2> ../actual.err
) &&
test_i18ncmp expected actual &&
- ! test -s actual.err
+ test_must_be_empty actual.err
test_expect_success 'submodule update should fail due to local changes' '
@@ -620,8 +620,8 @@ test_expect_success 'submodule update --init skips submodule with update=none' '
git clone super cloned &&
(cd cloned &&
git submodule update --init &&
- test -e submodule/.git &&
- test_must_fail test -e none/.git
+ test_path_exists submodule/.git &&
+ test_path_is_missing none/.git