send-email: add test for duplicate utf8 name

Verify that author name is not duplicated if it matches sender, even if it is in utf8 (the test expects a failure that will be fixed in the next patch). Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Michael S. Tsirkin committed Jun 18, 2013 at 15:49 UTC f07075c297d8a9b58b693176b6ae73dbabcdb103
1 file changed +14
t/t9001-send-email.sh
+14
@@ -956,6 +956,20 @@ test_expect_success $PREREQ 'utf8 author is correctly passed on' '
956 grep "^From: Füñný Nâmé <odd_?=mail@example.com>" msgtxt1
957 '
958
959 +test_expect_failure $PREREQ 'utf8 sender is not duplicated' '
960 + clean_fake_sendmail &&
961 + test_commit weird_sender &&
962 + test_when_finished "git reset --hard HEAD^" &&
963 + git commit --amend --author "Füñný Nâmé <odd_?=mail@example.com>" &&
964 + git format-patch --stdout -1 >funny_name.patch &&
965 + git send-email --from="Füñný Nâmé <odd_?=mail@example.com>" \
966 + --to=nobody@example.com \
967 + --smtp-server="$(pwd)/fake.sendmail" \
968 + funny_name.patch &&
969 + grep "^From: " msgtxt1 >msgfrom &&
970 + test_line_count = 1 msgfrom
971 +'
972 +
973 test_expect_success $PREREQ 'sendemail.composeencoding works' '
974 clean_fake_sendmail &&
975 git config sendemail.composeencoding iso-8859-1 &&