X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/3f609815e33ab5474e631eac097d515d982ff0f5..dc4c3c4eeb3f74e5a7e3fedaded066572eac320b:/test/mhfixmsg/test-mhfixmsg diff --git a/test/mhfixmsg/test-mhfixmsg b/test/mhfixmsg/test-mhfixmsg index f7f47b90..cf97d5ff 100755 --- a/test/mhfixmsg/test-mhfixmsg +++ b/test/mhfixmsg/test-mhfixmsg @@ -51,6 +51,8 @@ Usage: mhfixmsg [+folder] [msgs] [switches] switches are: -decodetext 8bit|7bit -nodecodetext + -decodetypes + -[no]crlflinebreaks -[no]textcharset -[no]reformat -[no]replacetextplain @@ -418,11 +420,11 @@ else fi -# check -decode (enabled by default) +# check -decodetext (enabled by default) cat >"$expected" <`mhpath new` <$expected <`mhpath new` <$expected <`mhpath new` <`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` <"$expected" <`mhpath new` <<'EOF' @@ -989,6 +1108,33 @@ run_prog mhfixmsg last -outfile "$actual" check "$expected" "$actual" +# check stripping of CRs from ASCII text context +cat >"$expected" <`mhpath new` <<'EOF' +MIME-Version: 1.0 +From: sender@example.com +To: recipient@example.com +Subject: message with CR's +Date: Mon, 29 Apr 2013 11:51:45 -0400 + +There were two CR-LF pairs at the end of this sentence. + +EOF + +run_prog mhfixmsg last -outfile "$actual" -nocrlflinebreaks +check "$expected" "$actual" + + # check -replacetextplain prepare_space >"$expected" <$expected < + + This was the text/html part. + + + + +------- =_aaaaaaaaaa0-- +EOF + +cat >`mhpath new` <$expected <`mhpath new` <$expected <`mhpath new` <$expected <`mhpath new` <"$actual"