From d20743433e5889319a82c26beb5789e708c450a2 Mon Sep 17 00:00:00 2001 From: Antoine Pelisse Date: Sat, 5 Jan 2013 22:26:44 +0100 Subject: [PATCH] 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 Signed-off-by: Junio C Hamano --- t/t4203-mailmap.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh index 1f182f612c..db043dcec6 100755 --- a/t/t4203-mailmap.sh +++ b/t/t4203-mailmap.sh @@ -239,6 +239,20 @@ test_expect_success 'Log output (complex mapping)' ' test_cmp expect actual ' +cat >expect <<\EOF +Author: CTO +Author: Santa Claus +Author: Santa Claus +Author: Other Author +Author: Other Author +Author: Some Dude +Author: A U Thor +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