]> git.ipfire.org Git - thirdparty/git.git/commit
tests: use 'test_must_be_empty' instead of 'test ! -s'
authorSZEDER Gábor <szeder.dev@gmail.com>
Sun, 19 Aug 2018 21:57:23 +0000 (23:57 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 21 Aug 2018 18:48:31 +0000 (11:48 -0700)
commitf0dc593a95877298ba6fa9d29e5c779832ad5894
tree681d125d75ad101f756e5aa8da69e8b8547393b4
parentec10b018e76b3f4f40db96a24202c6b8c056bd0f
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>
t/t4201-shortlog.sh
t/t4211-line-log.sh
t/t8010-cat-file-filters.sh
t/t9802-git-p4-filetype.sh