git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 1/3] t1503: use test_must_be_empty
@ 2014-09-16  3:24 David Aguilar
  2014-09-16  3:24 ` [PATCH v4 2/3] refs: make rev-parse --quiet actually quiet David Aguilar
  0 siblings, 1 reply; 4+ messages in thread
From: David Aguilar @ 2014-09-16  3:24 UTC (permalink / raw)
  To: Junio C Hamano
  Cc: git, Christian Couder, Ævar Arnfjörð Bjarmason,
	Jon Seymour, Ronnie Sahlberg, Michael Haggerty, Fabian Ruch,
	Johannes Sixt

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>
---
This patch should probably be applied on top of the
da/rev-parse-verify-quiet which is currently in pu
and contains the rev-parse documentation patch.

This patch has been rebased to be 1/3.

 t/t1503-rev-parse-verify.sh | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/t/t1503-rev-parse-verify.sh b/t/t1503-rev-parse-verify.sh
index 813cc1b..d1f93b3 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' '
-- 
2.1.0.30.g05c535b.dirty

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-09-16 18:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-16  3:24 [PATCH v4 1/3] t1503: use test_must_be_empty David Aguilar
2014-09-16  3:24 ` [PATCH v4 2/3] refs: make rev-parse --quiet actually quiet David Aguilar
2014-09-16  3:24   ` [PATCH v4 3/3] stash: prefer --quiet over shell redirection of the standard error stream David Aguilar
2014-09-16 18:26   ` [PATCH v4 2/3] refs: make rev-parse --quiet actually quiet Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).