From: David Levine Date: Wed, 25 Dec 2019 23:15:06 +0000 (-0500) Subject: Fixed source charset in mhfixmsg textcharset verbose output. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/3c751489b2aca846fe2305a6a3d189381579b61e Fixed source charset in mhfixmsg textcharset verbose output. Thanks to Conrad Hughes for reporting this bug. --- diff --git a/docs/pending-release-notes b/docs/pending-release-notes index 2c2b5608..7c2e5221 100644 --- a/docs/pending-release-notes +++ b/docs/pending-release-notes @@ -54,3 +54,4 @@ BUG FIXES (or zero) attendees match a user's mailbox. - Fixed inc(1) and %(me) function escape to not obey Local-Mailbox profile component. +- Fixed source charset in mhfixmsg textcharset verbose output. diff --git a/test/mhfixmsg/test-mhfixmsg b/test/mhfixmsg/test-mhfixmsg index 66e45a32..c80cfb8b 100755 --- a/test/mhfixmsg/test-mhfixmsg +++ b/test/mhfixmsg/test-mhfixmsg @@ -866,13 +866,32 @@ EOF if test "$ICONV_ENABLED" -eq 1; then run_prog mhfixmsg last -textcharset utf-8 -outfile "$actual" 2>&1 - check "$expected" "$actual" + check "$expected" "$actual" 'keep first' else echo "$0: skipping -textcharset check because nmh was built without iconv" rm -f "$expected" fi +# check -textcharset -verbose +start_test "-textcharset -verbose" +cat >"$expected.err" <"$actual.err" + check "$expected" "$actual" + check "$expected.err" "$actual.err" +else + echo "$0: skipping -textcharset -verbose check because nmh was built " \ + "without iconv" + rm -f "$expected" "$expected.err" +fi + + # check -nofixboundary start_test "-nofixboundary" cat >"$expected" <c_type) { case CT_TEXT: if (ct->c_subtype == TEXT_PLAIN) { + char *const ct_charset = content_charset (ct); + status = convert_charset (ct, dest_charset, message_mods); if (status == OK) { if (verbosw) { - char *ct_charset = content_charset (ct); - report (NULL, ct->c_partno, ct->c_file, "convert %s to %s", ct_charset, dest_charset); - free (ct_charset); } } else { - char *ct_charset = content_charset (ct); - report ("iconv", ct->c_partno, ct->c_file, "failed to convert %s to %s", ct_charset, dest_charset); - free (ct_charset); } + free (ct_charset); } break;