X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/18dccf2fe359926ac1c1bf1c5cc51f68b65cef46..8a1edeb17377d465644430b29cb04a4fe06d4a3b:/test/mhfixmsg/test-mhfixmsg?ds=sidebyside diff --git a/test/mhfixmsg/test-mhfixmsg b/test/mhfixmsg/test-mhfixmsg index a7932352..f7f47b90 100755 --- a/test/mhfixmsg/test-mhfixmsg +++ b/test/mhfixmsg/test-mhfixmsg @@ -25,10 +25,12 @@ expected_err="$MH_TEST_DIR/test-mhfixmsg$$.expected_err" actual="$MH_TEST_DIR/test-mhfixmsg$$.actual" actual_err="$MH_TEST_DIR/test-mhfixmsg$$.actual_err" -if grep mhfixmsg-format-text/html "${MH_TEST_DIR}/Mail/mhn.defaults" \ +mhn_defaults="$MH_INST_DIR${nmhetcdir}/mhn.defaults" + +if grep mhfixmsg-format-text/html "${mhn_defaults}" \ >/dev/null; then can_reformat_texthtml=1 - if grep 'mhfixmsg-format-text/html.*w3m' "${MH_TEST_DIR}/Mail/mhn.defaults" \ + if grep 'mhfixmsg-format-text/html.*w3m' "${mhn_defaults}" \ >/dev/null; then #### w3m uses $HOME/.w3m/, and creates it if it doesn't exist. To #### support testing with non-writeable $HOME, and to not leave @@ -835,6 +837,68 @@ else fi +# check that text/plain part is added to text/html in multipart/related +# when it should be +cat >"$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" <