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>
This commit is contained in:
Ævar Arnfjörð Bjarmason 2011-02-19 18:29:09 +00:00 коммит произвёл Junio C Hamano
Родитель 49151d8b2c
Коммит d5a719e4af
1 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -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.