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>
This commit is contained in:
David Aguilar 2014-09-15 20:24:08 -07:00 committed by Junio C Hamano
parent 56625df74c
commit 2892dfeec3

View file

@ -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' '