X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/513587ec31160434400bb003d7160777e2db6bb6..aaf70a50e13231ba06df17d79147ac0d7fed6d91:/test/mhfixmsg/test-mhfixmsg?ds=sidebyside diff --git a/test/mhfixmsg/test-mhfixmsg b/test/mhfixmsg/test-mhfixmsg index 77de37da..cf97d5ff 100755 --- a/test/mhfixmsg/test-mhfixmsg +++ b/test/mhfixmsg/test-mhfixmsg @@ -887,6 +887,33 @@ run_test 'mhfixmsg last -outfile '"$actual"' -verbose' \ check "$expected" "$actual" +# check that message is not modified when -fixboundary fails +cat >`mhpath new` < +To: +Subject: mhfixmsg bad boundary test + +This is a multi-part message in MIME format. + +------=_ NextPart_000_1781A1A_01CC1147.81EBA8D4 +Content-Type: text/plain + +The boundary below doesn't match the header boundary. + +------=_ +NextPart_000_1781A1A_01CC1147.81EBA8D4-- +EOF + +cp -p `mhpath last` "$expected" +run_test "mhfixmsg last -outfile $actual" '' +check "$expected" "$actual" + + # check that text/plain part is not added to text/html in multipart/related # when it shouldn't be cat >`mhpath new` < - This is the text/html part. + This was the text/html part. @@ -1376,16 +1403,16 @@ Content-Transfer-Encoding: quoted-printable This is the text/plain part. ------- =_aaaaaaaaaa0 -Content-Type: text/plain; charset="iso-8859-1"; name="test2.txt" +Content-Type: text/html; charset="iso-8859-1"; name="test2.txt" Content-Disposition: attachment; filename="test2.txt" Content-Transfer-Encoding: base64 -PGh0bWw+CjxoZWFkPgogICAgVGhpcyBpcyB0aGUgdGV4dC9odG1sIHBhcnQuCjwvaGVhZD4KPC9i -b2R5Pgo8L2h0bWw+Cg== +PGh0bWw+CjxoZWFkPgogICAgVGhpcyB3YXMgdGhlIHRleHQvaHRtbCBwYXJ0Lgo8L2hlYWQ+Cjwv +Ym9keT4KPC9odG1sPgo= ------- =_aaaaaaaaaa0-- EOF -run_prog mhfixmsg last -outfile "$actual" +run_prog mhfixmsg last -outfile "$actual" -noreformat check "$expected" "$actual" @@ -1406,15 +1433,32 @@ Content-Transfer-Encoding: 8bit This is the text/plain part. ------- =_aaaaaaaaaa0 -Content-Type: multipart/alternative; boundary="----=_nmh-multipart2" +Content-Type: text/html; charset="iso-8859-1"; name="test2.txt" +Content-Disposition: attachment; filename="test2.txt" +Content-Transfer-Encoding: base64 -------=_nmh-multipart2 -Content-Type: text/plain; charset="iso-8859-1"; name="test2.txt" -Content-Transfer-Encoding: 8bit +PGh0bWw+DQo8aGVhZD4NCiAgICBUaGlzIGlzIHRoZSB0ZXh0L2h0bWwgcGFydC4NCjwvaGVhZD4N +CjwvYm9keT4NCjwvaHRtbD4NCg== -This is the text/html part. +------- =_aaaaaaaaaa0-- +EOF + +cat >`mhpath new` <$expected <`mhpath new` <$expected <`mhpath new` <