diff options
author | David Aguilar <davvid@gmail.com> | 2014-09-15 20:24:08 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-09-16 11:13:10 -0700 |
commit | 2892dfeec3f98f7e65a2746d271471d2c3c4af57 (patch) | |
tree | 5559c8017205e5b0c26cbf8202d654603796305c /t/t1503-rev-parse-verify.sh | |
parent | 56625df74c969885c0c735203283bb1ebe1897ec (diff) | |
download | git-2892dfeec3f98f7e65a2746d271471d2c3c4af57.tar.gz git-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-x | t/t1503-rev-parse-verify.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/t/t1503-rev-parse-verify.sh b/t/t1503-rev-parse-verify.sh index 813cc1b3e..d1f93b340 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' ' |