summaryrefslogtreecommitdiff
path: root/t/t9001-send-email.sh
diff options
context:
space:
mode:
authorKrzysztof Mazur <krzysiek@podlesie.net>2012-10-22 14:41:48 +0200
committerJeff King <peff@peff.net>2012-10-25 06:00:07 -0400
commit4a47a4ddec0d4d37e81ad63385ca287abfe90f9b (patch)
tree1c86707e877c0a1f371df35546d2c8fb991f1cdd /t/t9001-send-email.sh
parent62e0069056ed11294c29bae25df69b6518f6339e (diff)
downloadgit-4a47a4ddec0d4d37e81ad63385ca287abfe90f9b.tar.gz
git-send-email: use compose-encoding for Subject
The commit "git-send-email: introduce compose-encoding" introduced the compose-encoding option to specify the introduction email encoding (--compose option), but the email Subject encoding was still hardcoded to UTF-8. Signed-off-by: Krzysztof Mazur <krzysiek@podlesie.net> Signed-off-by: Jeff King <peff@peff.net>
Diffstat (limited to 't/t9001-send-email.sh')
-rwxr-xr-xt/t9001-send-email.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index 265ae0463f..89fcedaa33 100755
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
@@ -909,6 +909,20 @@ test_expect_success $PREREQ '--compose-encoding overrides sendemail.composeencod
grep "^Content-Type: text/plain; charset=iso-8859-2" msgtxt1
'
+test_expect_success $PREREQ '--compose-encoding adds correct MIME for subject' '
+ clean_fake_sendmail &&
+ GIT_EDITOR="\"$(pwd)/fake-editor\"" \
+ git send-email \
+ --compose-encoding iso-8859-2 \
+ --compose --subject utf8-sübjëct \
+ --from="Example <nobody@example.com>" \
+ --to=nobody@example.com \
+ --smtp-server="$(pwd)/fake.sendmail" \
+ $patches &&
+ grep "^fake edit" msgtxt1 &&
+ grep "^Subject: =?iso-8859-2?q?utf8-s=C3=BCbj=C3=ABct?=" msgtxt1
+'
+
test_expect_success $PREREQ 'detects ambiguous reference/file conflict' '
echo master > master &&
git add master &&