Skip to content

Commit

Permalink
t1503: use test_must_be_empty
Browse files Browse the repository at this point in the history
Use `test_must_be_be_empty <file>` instead of `test -z "$(cat <file>)"`.

Suggested-by: Fabian Ruch <[email protected]>
Signed-off-by: David Aguilar <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
davvid authored and gitster committed Sep 16, 2014
1 parent 56625df commit 2892dfe
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions t/t1503-rev-parse-verify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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' '
Expand Down

0 comments on commit 2892dfe

Please sign in to comment.