Skip to content

Commit

Permalink
test: add test for --use-mailmap option
Browse files Browse the repository at this point in the history
The new option '--use-mailmap' can be used to make sure that mailmap
file is used to convert name when running log commands.

The test is simple and checks that the Author line
is correctly replaced when running log.

Signed-off-by: Antoine Pelisse <apelisse@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Antoine Pelisse authored and Junio C Hamano committed Jan 10, 2013
1 parent ea57bc0 commit d207434
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions t/t4203-mailmap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,20 @@ test_expect_success 'Log output (complex mapping)' '
test_cmp expect actual
'

cat >expect <<\EOF
Author: CTO <cto@company.xx>
Author: Santa Claus <santa.claus@northpole.xx>
Author: Santa Claus <santa.claus@northpole.xx>
Author: Other Author <other@author.xx>
Author: Other Author <other@author.xx>
Author: Some Dude <some@dude.xx>
Author: A U Thor <author@example.com>
EOF
test_expect_success 'Log output with --use-mailmap' '
git log --use-mailmap | grep Author >actual &&
test_cmp expect actual
'

# git blame
cat >expect <<\EOF
^OBJI (A U Thor DATE 1) one
Expand Down

0 comments on commit d207434

Please sign in to comment.