summaryrefslogtreecommitdiff
path: root/t/t9802-git-p4-filetype.sh
diff options
context:
space:
mode:
authorSZEDER Gábor <szeder.dev@gmail.com>2018-08-19 21:57:23 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-08-21 18:48:31 (GMT)
commitf0dc593a95877298ba6fa9d29e5c779832ad5894 (patch)
tree681d125d75ad101f756e5aa8da69e8b8547393b4 /t/t9802-git-p4-filetype.sh
parentec10b018e76b3f4f40db96a24202c6b8c056bd0f (diff)
downloadgit-f0dc593a95877298ba6fa9d29e5c779832ad5894.zip
git-f0dc593a95877298ba6fa9d29e5c779832ad5894.tar.gz
git-f0dc593a95877298ba6fa9d29e5c779832ad5894.tar.bz2
tests: use 'test_must_be_empty' instead of 'test ! -s'
Using 'test_must_be_empty' is preferable to 'test ! -s', because it gives a helpful error message if the given file is unexpectedly no empty, while the latter remains completely silent. Furthermore, it also catches cases when the given file unexpectedly does not exist at all. This patch was created by: sed -i -e 's/test ! -s/test_must_be_empty/' t[0-9]*.sh Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9802-git-p4-filetype.sh')
-rwxr-xr-xt/t9802-git-p4-filetype.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t9802-git-p4-filetype.sh b/t/t9802-git-p4-filetype.sh
index 1fc9b33..9978352 100755
--- a/t/t9802-git-p4-filetype.sh
+++ b/t/t9802-git-p4-filetype.sh
@@ -310,7 +310,7 @@ test_expect_success SYMLINKS 'empty symlink target' '
# p4 to sync here will make it generate errors.
cd "$cli" &&
p4 print -q //depot/empty-symlink#2 >out &&
- test ! -s out
+ test_must_be_empty out
) &&
test_when_finished cleanup_git &&