X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/e2eebc77cc570f77d906bc0cc6890092068468cb..4ac0ee4a2d30b9486957d3f0ef8c74bfa1226558:/test/mhfixmsg/test-mhfixmsg?ds=sidebyside diff --git a/test/mhfixmsg/test-mhfixmsg b/test/mhfixmsg/test-mhfixmsg index b8e0b426..61821c27 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` <"$expected" < + + HTML Content + + + This is the real content. + + + +------=_Part_90310_101292502.1-- +EOF + +cat >`mhpath new` < + + HTML Content + + + This is the real content. + + + +------=_Part_90310_101292502.1-- +EOF + +if [ $can_reformat_texthtml -eq 1 ]; then + #### lynx inserts multiple blank lines, so squeeze them. + run_prog mhfixmsg last -outfile - | squeeze_lines >"$actual" + check "$expected" "$actual" 'ignore space' +else + rm -f "$expected" +fi + + # check handling of rfc822 message type cat >"$expected" < @@ -900,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' @@ -927,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" <$expected < + + This was the text/html part. + + + + +------- =_aaaaaaaaaa0-- +EOF + +cat >`mhpath new` <$expected <`mhpath new` <$expected <`mhpath new` <$expected <`mhpath new` <"$actual"