X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/a2c417d3e1641ba4ab151b7945b90f55176705b1..605516b7c2e68efcd681478d40b210e6af968d58:/test/post/test-rfc6531 diff --git a/test/post/test-rfc6531 b/test/post/test-rfc6531 index 1df9a291..817388da 100755 --- a/test/post/test-rfc6531 +++ b/test/post/test-rfc6531 @@ -16,13 +16,13 @@ fi setup_test mhl="${MH_LIBEXEC_DIR}/mhl" +SMTPUTF8=1; export SMTPUTF8 #### Make sure that html-to-text conversion is what we expect. -require_locale en_US.utf-8 en_US.utf8 -LC_ALL=en_US.UTF-8; export LC_ALL +require_locale en_US.UTF-8 en_US.UTF8 en_US.utf-8 en_US.utf8 #### Enable EAI in mhbuild, via the profile. -sed "s%^\(mhbuild: .*\)%\1 -headerencoding 8bit%" "$MH" >"$MH.new" +sed "s%^\(mhbuild: .*\)%\1 -headerencoding utf-8%" "$MH" >"$MH.new" mv -f "$MH.new" "$MH" # check SMTPUTF8 basic @@ -66,7 +66,61 @@ Computing Edge 1:6, June 2015, http://www.computer.org/cms/computing-edge/ce-jun15-final.pdf, p. 50. EOF -test_post "${testname}.actual" "${testname}.expected" -eai +test_post "${testname}.actual" "${testname}.expected" + + +# check SMTPUTF8 without 8-bit body +start_test '8-bit headers with ASCII body' + +cat > "${testname}.expected" < BODY=8BITMIME SMTPUTF8 +RCPT TO: +DATA +From: senderø@example.com +To: recipientæ@example.com +Subject: Blåbærsyltetøy +MIME-Version: 1.0 +Content-Type: text/plain; charset="UTF-8" +Content-Transfer-Encoding: 8bit +Date: + +This is a test. +. +QUIT +EOF + +cat > "${MH_TEST_DIR}/Mail/draft" < "${testname}.expected" < "${testname}.expected.err" <"${testname}.err" +set -e +check "${testname}.err" "${testname}.expected.err" finish_test