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>
Antoine Pelisse committed
Jan 5, 2013 at 22:26 UTC
d20743433e5889319a82c26beb5789e708c450a2
1 file changed
+14
t/t4203-mailmap.sh
+14
@@ -239,6 +239,20 @@ test_expect_success 'Log output (complex mapping)' '
239
test_cmp expect actual
240
'
241
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
+
256
# git blame
257
cat >expect <<\EOF
258
^OBJI (A U Thor DATE 1) one