summaryrefslogtreecommitdiff
path: root/t/t4203-mailmap.sh
diff options
context:
space:
mode:
authorAntoine Pelisse <apelisse@gmail.com>2013-01-05 21:26:44 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-01-10 20:33:08 (GMT)
commitd20743433e5889319a82c26beb5789e708c450a2 (patch)
tree18b7fc2d190591c01d022f1038ca091727b449ac /t/t4203-mailmap.sh
parentea57bc0d41b03cc1528be5fafa5eb8bfd4f773cb (diff)
downloadgit-d20743433e5889319a82c26beb5789e708c450a2.zip
git-d20743433e5889319a82c26beb5789e708c450a2.tar.gz
git-d20743433e5889319a82c26beb5789e708c450a2.tar.bz2
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>
Diffstat (limited to 't/t4203-mailmap.sh')
-rwxr-xr-xt/t4203-mailmap.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh
index 1f182f6..db043dc 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 <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