X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/50fbf868c8a1b76f46bbb3a0c4bca0ed926bb6e2..7711f3fc00259e55f630cfe6104eff3083dc9d77:/test/mhfixmsg/test-mhfixmsg diff --git a/test/mhfixmsg/test-mhfixmsg b/test/mhfixmsg/test-mhfixmsg index b6b01081..b8e0b426 100755 --- a/test/mhfixmsg/test-mhfixmsg +++ b/test/mhfixmsg/test-mhfixmsg @@ -12,7 +12,9 @@ if test -z "${MH_OBJ_DIR}"; then MH_OBJ_DIR=`cd $srcdir && pwd`; export MH_OBJ_DIR fi -. "${srcdir}/test/post/test-post-common.sh" +. "${MH_OBJ_DIR}/test/common.sh" + +setup_test #### Make sure that html-to-text conversion is what we expect. require_locale en_US.utf-8 en_US.utf8 @@ -23,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 @@ -52,6 +56,7 @@ Usage: mhfixmsg [+folder] [msgs] [switches] -[no]replacetextplain -[no]fixboundary -[no]fixcte + -fixtype mimetype -file file -outfile file -rmmproc program @@ -1108,6 +1113,41 @@ if test -f '${MH_TEST_DIR}/Mail/inbox/20.backup'; then fi +# check -fixtype +cat >"$expected" <`mhpath new` <"$actual"