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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ea57bc0 commit d207434

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

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 <[email protected]>
244+
Author: Santa Claus <[email protected]>
245+
Author: Santa Claus <[email protected]>
246+
Author: Other Author <[email protected]>
247+
Author: Other Author <[email protected]>
248+
Author: Some Dude <[email protected]>
249+
Author: A U Thor <[email protected]>
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)