summaryrefslogtreecommitdiff
path: root/t/t1503-rev-parse-verify.sh
diff options
context:
space:
mode:
authorLibravatar David Aguilar <davvid@gmail.com>2014-09-15 20:24:08 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-09-16 11:13:10 -0700
commit2892dfeec3f98f7e65a2746d271471d2c3c4af57 (patch)
tree5559c8017205e5b0c26cbf8202d654603796305c /t/t1503-rev-parse-verify.sh
parentDocumentation: a note about stdout for git rev-parse --verify --quiet (diff)
downloadtgif-2892dfeec3f98f7e65a2746d271471d2c3c4af57.tar.xz
t1503: use test_must_be_empty
Use `test_must_be_be_empty <file>` instead of `test -z "$(cat <file>)"`. Suggested-by: Fabian Ruch <bafain@gmail.com> Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1503-rev-parse-verify.sh')
-rwxr-xr-xt/t1503-rev-parse-verify.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/t/t1503-rev-parse-verify.sh b/t/t1503-rev-parse-verify.sh
index 813cc1b3e2..d1f93b3405 100755
--- a/t/t1503-rev-parse-verify.sh
+++ b/t/t1503-rev-parse-verify.sh
@@ -72,15 +72,15 @@ test_expect_success 'fails with any bad rev or many good revs' '
test_expect_success 'fails silently when using -q' '
test_must_fail git rev-parse --verify --quiet 2>error &&
- test -z "$(cat error)" &&
+ test_must_be_empty error &&
test_must_fail git rev-parse -q --verify foo 2>error &&
- test -z "$(cat error)" &&
+ test_must_be_empty error &&
test_must_fail git rev-parse --verify -q HEAD bar 2>error &&
- test -z "$(cat error)" &&
+ test_must_be_empty error &&
test_must_fail git rev-parse --quiet --verify baz HEAD 2>error &&
- test -z "$(cat error)" &&
+ test_must_be_empty error &&
test_must_fail git rev-parse -q --verify $HASH2 HEAD 2>error &&
- test -z "$(cat error)"
+ test_must_be_empty error
'
test_expect_success 'no stdout output on error' '