]> diplodocus.org Git - nmh/blobdiff - test/post/test-rfc6531
base64.c: Don't out-of-bounds printf("%s", &encoded[-1]).
[nmh] / test / post / test-rfc6531
index 8d5391dc1a558eaade8e886e2dd1e941ea0bf70a..817388dab9ea6f56c2b22267b83219718add954a 100755 (executable)
@@ -69,6 +69,39 @@ EOF
 test_post "${testname}.actual" "${testname}.expected"
 
 
+# check SMTPUTF8 without 8-bit body
+start_test '8-bit headers with ASCII body'
+
+cat > "${testname}.expected" <<EOF
+EHLO nosuchhost.example.com
+MAIL FROM:<senderø@example.com> BODY=8BITMIME SMTPUTF8
+RCPT TO:<recipientæ@example.com>
+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" <<EOF
+From: senderø@example.com
+To: recipientæ@example.com
+Subject: Blåbærsyltetøy
+--------
+This is a test.
+EOF
+
+test_post "${testname}.actual" "${testname}.expected"
+
+
+# check with smtp server that doesn't support SMTPUTF8
 start_test "smtp server doesn't support SMTPUTF8"
 unset SMTPUTF8
 cat > "${testname}.expected" <<EOF