t4203: demonstrate loss of uppercase characters in canonical email

The email addresses read from .mailmap are downcased before being
inserted into the mailmap data structure, which undesirably loses
information.  It is impossible, for instance, to map <first.last@host>
to <First.Last@host>. Demonstrate this problem.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Eric Sunshine 2013-07-15 02:54:07 -04:00 committed by Junio C Hamano
parent 8c3811510e
commit 3aff56ddbe

View File

@ -256,6 +256,15 @@ test_expect_success 'single-character name' '
test_cmp expect actual
'
test_expect_failure 'preserve canonical email case' '
echo " 1 A U Thor <AUTHOR@example.com>" >expect &&
echo " 1 nick1 <bugs@company.xx>" >>expect &&
echo "<AUTHOR@example.com> <author@example.com>" >.mailmap &&
test_when_finished "rm .mailmap" &&
git shortlog -es HEAD >actual &&
test_cmp expect actual
'
# Extended mailmap configurations should give us the following output for shortlog
cat >expect <<\EOF
A U Thor <author@example.com> (1):