X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/02b87ac3a62664b19173721b9f109f4239e6a16c..4ac0ee4a2d30b9486957d3f0ef8c74bfa1226558:/test/mhfixmsg/test-mhfixmsg diff --git a/test/mhfixmsg/test-mhfixmsg b/test/mhfixmsg/test-mhfixmsg index 323fb72a..61821c27 100755 --- a/test/mhfixmsg/test-mhfixmsg +++ b/test/mhfixmsg/test-mhfixmsg @@ -52,6 +52,7 @@ Usage: mhfixmsg [+folder] [msgs] [switches] -decodetext 8bit|7bit -nodecodetext -decodetypes + -[no]crlflinebreaks -[no]textcharset -[no]reformat -[no]replacetextplain @@ -1053,7 +1054,7 @@ run_test 'mhfixmsg last -outfile '"$actual" '' check "$expected" "$actual" -# check stripping of CRs from ASCII text context +# check not stripping of CRs from ASCII text context (default) cat >"$expected" <`mhpath new` <<'EOF' @@ -1080,6 +1081,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" < - This is the text/html part. + This was the text/html part. @@ -1348,16 +1376,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" @@ -1378,15 +1406,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== + +------- =_aaaaaaaaaa0-- +EOF + +cat >`mhpath new` <$expected <`mhpath new` <$expected <`mhpath new` <