diff options
author | SZEDER Gábor <szeder.dev@gmail.com> | 2018-08-19 23:57:23 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-08-21 11:48:31 -0700 |
commit | f0dc593a95877298ba6fa9d29e5c779832ad5894 (patch) | |
tree | 681d125d75ad101f756e5aa8da69e8b8547393b4 /t/t4201-shortlog.sh | |
parent | tests: use 'test_must_be_empty' instead of '! test -s' (diff) | |
download | tgif-f0dc593a95877298ba6fa9d29e5c779832ad5894.tar.xz |
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/t4201-shortlog.sh')
-rwxr-xr-x | t/t4201-shortlog.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t4201-shortlog.sh b/t/t4201-shortlog.sh index 58c2773676..d3a7ce6bbb 100755 --- a/t/t4201-shortlog.sh +++ b/t/t4201-shortlog.sh @@ -192,7 +192,7 @@ test_expect_success 'shortlog with revision pseudo options' ' test_expect_success 'shortlog with --output=<file>' ' git shortlog --output=shortlog -1 master >output && - test ! -s output && + test_must_be_empty output && test_line_count = 3 shortlog ' |