diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2011-02-19 18:29:09 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-02-21 10:55:53 -0800 |
commit | d5a719e4afbfd74cf5ccf94c2a5b27aa5d06e914 (patch) | |
tree | 81c44a9771c5718042883187a80c6f6d7d632e42 /t/t7500-commit.sh | |
parent | 49151d8b2cde68bc110a8bb899b8610631430941 (diff) | |
download | git-d5a719e4afbfd74cf5ccf94c2a5b27aa5d06e914.tar.gz git-d5a719e4afbfd74cf5ccf94c2a5b27aa5d06e914.tar.xz |
t/t7500-commit.sh: use test_cmp instead of test
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7500-commit.sh')
-rwxr-xr-x | 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 162527c21..d551b77ce 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. |