Skip to content

Commit d207434

Browse files
apelissegitster
authored andcommitted
test: add test for --use-mailmap option
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>
1 parent ea57bc0 commit d207434

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

t/t4203-mailmap.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,20 @@ test_expect_success 'Log output (complex mapping)' '
239239
test_cmp expect actual
240240
'
241241

242+
cat >expect <<\EOF
243+
Author: CTO <cto@company.xx>
244+
Author: Santa Claus <santa.claus@northpole.xx>
245+
Author: Santa Claus <santa.claus@northpole.xx>
246+
Author: Other Author <other@author.xx>
247+
Author: Other Author <other@author.xx>
248+
Author: Some Dude <some@dude.xx>
249+
Author: A U Thor <author@example.com>
250+
EOF
251+
test_expect_success 'Log output with --use-mailmap' '
252+
git log --use-mailmap | grep Author >actual &&
253+
test_cmp expect actual
254+
'
255+
242256
# git blame
243257
cat >expect <<\EOF
244258
^OBJI (A U Thor DATE 1) one

0 commit comments

Comments
 (0)