* [PATCH] t/t7500-commit.sh: use test_cmp instead of test
@ 2011-02-19 18:29 Ævar Arnfjörð Bjarmason
0 siblings, 0 replies; only message in thread
From: Ævar Arnfjörð Bjarmason @ 2011-02-19 18:29 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Steven Grimm,
Ævar Arnfjörð Bjarmason
Change commit_msg_is() in t/t7500-commit.sh to use test_cmp instead of
the shell's test function. Now if a test fails we'll get test_cmp
output showing us what failed.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
t/t7500-commit.sh | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/t/t7500-commit.sh b/t/t7500-commit.sh
index 162527c..d551b77 100755
--- a/t/t7500-commit.sh
+++ b/t/t7500-commit.sh
@@ -10,7 +10,12 @@ Tests for selected commit options.'
. ./test-lib.sh
commit_msg_is () {
- test "`git log --pretty=format:%s%b -1`" = "$1"
+ expect=commit_msg_is.expect
+ actual=commit_msg_is.actual
+
+ printf "%s" "$(git log --pretty=format:%s%b -1)" >$expect &&
+ printf "%s" "$1" >$actual &&
+ test_cmp $expect $actual
}
# A sanity check to see if commit is working at all.
--
1.7.2.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-02-19 18:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-19 18:29 [PATCH] t/t7500-commit.sh: use test_cmp instead of test Ævar Arnfjörð Bjarmason
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).