Skip to content

Commit d5a719e

Browse files
avargitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 49151d8 commit d5a719e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

t/t7500-commit.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ Tests for selected commit options.'
1010
. ./test-lib.sh
1111

1212
commit_msg_is () {
13-
test "`git log --pretty=format:%s%b -1`" = "$1"
13+
expect=commit_msg_is.expect
14+
actual=commit_msg_is.actual
15+
16+
printf "%s" "$(git log --pretty=format:%s%b -1)" >$expect &&
17+
printf "%s" "$1" >$actual &&
18+
test_cmp $expect $actual
1419
}
1520

1621
# A sanity check to see if commit is working at all.

0 commit comments

Comments
 (0)