Skip to content

Commit 2892dfe

Browse files
davvidgitster
authored andcommitted
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>
1 parent 56625df commit 2892dfe

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

t/t1503-rev-parse-verify.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@ test_expect_success 'fails with any bad rev or many good revs' '
7272

7373
test_expect_success 'fails silently when using -q' '
7474
test_must_fail git rev-parse --verify --quiet 2>error &&
75-
test -z "$(cat error)" &&
75+
test_must_be_empty error &&
7676
test_must_fail git rev-parse -q --verify foo 2>error &&
77-
test -z "$(cat error)" &&
77+
test_must_be_empty error &&
7878
test_must_fail git rev-parse --verify -q HEAD bar 2>error &&
79-
test -z "$(cat error)" &&
79+
test_must_be_empty error &&
8080
test_must_fail git rev-parse --quiet --verify baz HEAD 2>error &&
81-
test -z "$(cat error)" &&
81+
test_must_be_empty error &&
8282
test_must_fail git rev-parse -q --verify $HASH2 HEAD 2>error &&
83-
test -z "$(cat error)"
83+
test_must_be_empty error
8484
'
8585

8686
test_expect_success 'no stdout output on error' '

0 commit comments

Comments
 (0)