From d5a719e4afbfd74cf5ccf94c2a5b27aa5d06e914 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Sat, 19 Feb 2011 18:29:09 +0000 Subject: [PATCH] t/t7500-commit.sh: use test_cmp instead of test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Junio C Hamano --- t/t7500-commit.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/t/t7500-commit.sh b/t/t7500-commit.sh index 162527c211..d551b77ce6 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.