Skip to content

Commit f07075c

Browse files
mstsirkingitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1495266 commit f07075c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

t/t9001-send-email.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -956,6 +956,20 @@ test_expect_success $PREREQ 'utf8 author is correctly passed on' '
956956
grep "^From: Füñný Nâmé <[email protected]>" msgtxt1
957957
'
958958

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é <[email protected]>" &&
964+
git format-patch --stdout -1 >funny_name.patch &&
965+
git send-email --from="Füñný Nâmé <[email protected]>" \
966+
967+
--smtp-server="$(pwd)/fake.sendmail" \
968+
funny_name.patch &&
969+
grep "^From: " msgtxt1 >msgfrom &&
970+
test_line_count = 1 msgfrom
971+
'
972+
959973
test_expect_success $PREREQ 'sendemail.composeencoding works' '
960974
clean_fake_sendmail &&
961975
git config sendemail.composeencoding iso-8859-1 &&

0 commit comments

Comments
 (0)