From: David Levine Date: Sun, 30 Jun 2013 23:03:28 +0000 (-0500) Subject: More debugging of test-mhfixmsg on Solaris. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/aea16162c12426db8747be3a4328ffd4c66db5aa?ds=sidebyside;hp=-c More debugging of test-mhfixmsg on Solaris. --- aea16162c12426db8747be3a4328ffd4c66db5aa diff --git a/test/mhfixmsg/test-mhfixmsg b/test/mhfixmsg/test-mhfixmsg index bc46964f..cfe21af3 100755 --- a/test/mhfixmsg/test-mhfixmsg +++ b/test/mhfixmsg/test-mhfixmsg @@ -64,6 +64,51 @@ case `mhfixmsg -version` in failed=`expr ${failed:-0} + 1`;; esac +# ???? +cat >`mhpath new` <<'EOF' +MIME-Version: 1.0 +Content-Type: text/html; charset="ISO-8859-1" +Content-Transfer-Encoding: quoted-printable +Date: Thu, 11 Apr 2013 02:47:08 -0700 +To: +From: +Subject: body requires binary encoding + + + +  + + + +EOF + +if [ $can_reformat_texthtml -eq 1 ]; then + #### lynx inserts multiple blank lines, so use uniq to squeeze them. + mhfixmsg last -outfile - | uniq >"$actual" + check "$expected" "$actual" 'ignore space' +else + cp -p "$MH_TEST_DIR/Mail/inbox/15" "$MH_TEST_DIR/Mail/inbox/15.backup" + rm -f "$expected" +fi +exit # ???? + # check that non-MIME messages aren't modified # check -outfile @@ -666,17 +711,11 @@ d>
Mile $0.00
Time$78.71
<= +font face=3D"Arial, Helvetica, sans-serif" color=3D"#333333" size=3D"2">State Tax $5.90
Vehicle License Fee $1.84
State Txn Tax $6.00
EOF -# ???? debug on Solaris -egrep mhfixmsg ${MH_TEST_DIR}/Mail/mhn.defaults # ???? if [ $can_reformat_texthtml -eq 1 ]; then #### lynx inserts multiple blank lines, so use uniq to squeeze them. - # ???? mhfixmsg last -outfile - | uniq >"$actual" - # ???? temporarily add -verbose to debug on Solaris - mhfixmsg -verbose last -outfile - | uniq >"$actual" # ???? + mhfixmsg last -outfile - | uniq >"$actual" check "$expected" "$actual" 'ignore space' else - # ???? temporarily added to debug on Solaris - echo "can't reformat text/html" # ???? cp -p "$MH_TEST_DIR/Mail/inbox/15" "$MH_TEST_DIR/Mail/inbox/15.backup" rm -f "$expected" fi diff --git a/uip/mhfixmsg.c b/uip/mhfixmsg.c index 2714024d..b96cf6b1 100644 --- a/uip/mhfixmsg.c +++ b/uip/mhfixmsg.c @@ -1559,7 +1559,10 @@ content_encoding (CT ct) { size_t line_len = 0; int last_char_was_cr = 0; + fprintf (stderr, "%s:%d; %*s\n", __FILE__, __LINE__, inbytes, buffer); /* ???? */ + for (i = 0, cp = buffer; i < inbytes; ++i, ++cp) { + fprintf (stderr, "line_len=%d\n", line_len); /* ???? */ if (*cp == '\0' || ++line_len > 998 || (*cp != '\n' && last_char_was_cr)) { encoding = CE_BINARY;