summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 49151d8)
raw | patch | inline | side by side (parent: 49151d8)
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | |
Sat, 19 Feb 2011 18:29:09 +0000 (18:29 +0000) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 21 Feb 2011 18:55:53 +0000 (10:55 -0800) |
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>
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>
t/t7500-commit.sh | patch | blob | history |
diff --git a/t/t7500-commit.sh b/t/t7500-commit.sh
index 162527c2114955df2c55db9bf37db59d05fe75f8..d551b77ce6d94acce80069f2197f0169ee59e6d5 100755 (executable)
--- a/t/t7500-commit.sh
+++ b/t/t7500-commit.sh
. ./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.