X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/d3ecbe4bae7a3f1972b553d4b1efab3079ef0bae..f139ce94a95fd895d8b4b74826660ab076ed5129:/test/mhfixmsg/test-mhfixmsg?ds=inline diff --git a/test/mhfixmsg/test-mhfixmsg b/test/mhfixmsg/test-mhfixmsg index e5df1430..a95ef3f2 100755 --- a/test/mhfixmsg/test-mhfixmsg +++ b/test/mhfixmsg/test-mhfixmsg @@ -16,9 +16,10 @@ fi setup_test +check_exit '-eq 1' mhfixmsg - # gcov + #### 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 expected="$MH_TEST_DIR/test-mhfixmsg$$.expected" expected_err="$MH_TEST_DIR/test-mhfixmsg$$.expected_err" @@ -212,13 +213,13 @@ Content-Type: multipart/alternative; boundary="----=_nmh-multipart" ------=_nmh-multipart Content-Type: text/plain; charset="Windows-1252" -Content-Transfer-Encoding: 8bit +Content-Transfer-Encoding: 7bit Need to go! Need ... to ... go! ------=_nmh-multipart Content-Type: text/html; charset="Windows-1252" -Content-Transfer-Encoding: 8bit +Content-Transfer-Encoding: 7bit @@ -291,7 +292,7 @@ Content-Type: multipart/alternative; boundary="----=_nmh-multipart-3" ------=_nmh-multipart-3 Content-Type: text/plain; charset="Windows-1252" -Content-Transfer-Encoding: 8bit +Content-Transfer-Encoding: 7bit ------=_nmh-multipart ------=_nmh-multipart-1 @@ -299,7 +300,7 @@ Content-Transfer-Encoding: 8bit ------=_nmh-multipart-3 Content-Type: text/html; charset="Windows-1252" -Content-Transfer-Encoding: 8bit +Content-Transfer-Encoding: 7bit @@ -369,7 +370,7 @@ Content-Type: multipart/alternative; boundary="----=_nmh-multipart" ------=_nmh-multipart Content-Type: text/plain; charset="Windows-1252" -Content-Transfer-Encoding: 8bit +Content-Transfer-Encoding: 7bit Need to go! Need ... to ... go! @@ -443,7 +444,7 @@ Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="iso-8859-1"; name="test4.txt" Content-Disposition: attachment; filename="test4.txt" -Content-Transfer-Encoding: 8bit +Content-Transfer-Encoding: 7bit This is a text/plain part. @@ -500,7 +501,7 @@ This is additional content after the last subpart of the multipart. Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: attachment; filename="test2.txt" Content-MD5: kq+Hnc2SD/eKwAnkFBDuEA== -Content-Transfer-Encoding: 8bit +Content-Transfer-Encoding: 7bit This is the second text/plain part. @@ -513,7 +514,7 @@ This is the third text/plain part. ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="iso-8859-1"; name="test4.txt" Content-Disposition: attachment; filename="test4.txt" -Content-Transfer-Encoding: 8bit +Content-Transfer-Encoding: 7bit This is the fourth text/plain part. @@ -611,7 +612,7 @@ Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="iso-8859-1" -Content-Transfer-Encoding: 8bit +Content-Transfer-Encoding: 7bit This is a text plain part @@ -697,10 +698,11 @@ From: sender@example.com Subject: mhfixmsg successful decode of text/plain with failed binary decode MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" +Content-Transfer-Encoding: binary ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="iso-8859-1" -Content-Transfer-Encoding: 8bit +Content-Transfer-Encoding: 7bit This is a text plain part @@ -725,6 +727,7 @@ From: sender@example.com Subject: mhfixmsg binary decode test MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=\"----- =_aaaaaaaaaa0\" +Content-Transfer-Encoding: binary ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset=\"UTF-8\"; name=\"nul+square.txt\" @@ -750,7 +753,7 @@ Content-Type: multipart/alternative; boundary="----=_nmh-multipart" ------=_nmh-multipart Content-Type: text/plain; charset="ISO-8859-1" -Content-Transfer-Encoding: 8bit +Content-Transfer-Encoding: 7bit Mile $0.00 Time $78.71 @@ -821,6 +824,7 @@ From: sender@example.com Subject: mhfixmsg textcharset test MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" +Content-Transfer-Encoding: 8bit ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="utf-8"; name="square.txt" @@ -1068,6 +1072,7 @@ fi # check handling of rfc822 message type +# also, checks -fixboundary start_test "handling of rfc822 message type" cat >"$expected" < @@ -1105,7 +1110,7 @@ Date: Fri, 29 Sep 2006 00:00:00 Message-Id: @test.nmh Subject: message with message/rfc822 attachment MIME-Version: 1.0 -Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaa0" +Content-Type: multipart/mixed; boundary="----- =badboundary" and some garbage before the attachment @@ -1198,13 +1203,12 @@ Content-Type: multipart/alternative; boundary="----=_Part_876302" ------=_Part_876302 Content-Type: text/plain; charset="UTF-8" -Content-Transfer-Encoding: 8bit +Content-Transfer-Encoding: 7bit Yes, the text/plain part really was empty. ------=_Part_876302 Content-Type: text/html; charset="UTF-8" -Content-Transfer-Encoding: 8bit Content-Disposition: inline @@ -1234,7 +1238,6 @@ Content-Disposition: inline ------=_Part_876302 Content-Type: text/html; charset="UTF-8" -Content-Transfer-Encoding: 8bit Content-Disposition: inline @@ -1276,7 +1279,6 @@ Content-Disposition: inline ------=_Part_876302 Content-Type: text/html; charset="UTF-8" -Content-Transfer-Encoding: 8bit Content-Disposition: inline @@ -1428,14 +1430,14 @@ Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: attachment; filename="test1.txt" Content-MD5: kq+Hnc2SD/eKwAnkFBDuEA== -Content-Transfer-Encoding: 8bit +Content-Transfer-Encoding: 7bit This is the text/plain part. ------- =_aaaaaaaaaa0 Content-Type: text/html; charset="iso-8859-1"; name="test2.txt" Content-Disposition: attachment; filename="test2.txt" -Content-Transfer-Encoding: 8bit +Content-Transfer-Encoding: 7bit @@ -1489,7 +1491,7 @@ Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: attachment; filename="test1.txt" Content-MD5: kq+Hnc2SD/eKwAnkFBDuEA== -Content-Transfer-Encoding: 8bit +Content-Transfer-Encoding: 7bit This is the text/plain part. @@ -1546,14 +1548,14 @@ Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: attachment; filename="test1.txt" Content-MD5: kq+Hnc2SD/eKwAnkFBDuEA== -Content-Transfer-Encoding: 8bit +Content-Transfer-Encoding: 7bit This is the text/plain part. ------- =_aaaaaaaaaa0 Content-Type: application/ics; charset="iso-8859-1"; name="invite.ics" Content-Disposition: attachment; filename="invite.ics" -Content-Transfer-Encoding: 8bit +Content-Transfer-Encoding: 7bit BEGIN:VCALENDAR VERSION:2.0 @@ -1614,14 +1616,14 @@ Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: attachment; filename="test1.txt" Content-MD5: kq+Hnc2SD/eKwAnkFBDuEA== -Content-Transfer-Encoding: 8bit +Content-Transfer-Encoding: 7bit This is the text/plain part. ------- =_aaaaaaaaaa0 Content-Type: application/ics; charset="iso-8859-1"; name="invite.ics" Content-Disposition: attachment; filename="invite.ics" -Content-Transfer-Encoding: 8bit +Content-Transfer-Encoding: 7bit BEGIN:VCALENDAR VERSION:2.0 @@ -1716,6 +1718,7 @@ check `mhpath last` "$actual" start_test "fix RFC 2047 encoded header parameters" +#### Also, add C-T-E:8bit to the message headers. cat >"$expected" <