X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/6fc2909634fb431c65ecfa8b6db4f6519f99b389..b957327c2a4337dc2219ae3ea5b05de8bed38f8f:/test/repl/test-convert diff --git a/test/repl/test-convert b/test/repl/test-convert index f7c15dc0..f2792a69 100755 --- a/test/repl/test-convert +++ b/test/repl/test-convert @@ -17,7 +17,7 @@ fi expected="$MH_TEST_DIR/test-convert$$.expected" actual=`mhpath +`/draft -printf 'Local-Mailbox: recipient@example.com' >>"$MH" +printf 'Local-Mailbox: recipient@example.com\n' >>"$MH" #### Make sure that this works with 7-bit encoding. @@ -74,10 +74,57 @@ mhbuild "$actual" check "$actual" "$expected" +# check that text is not quoted-printable encoded +# This tests the setting of reply_ct->c_reqencoding and +# (*text_plain_ct)->c_reqencoding in expand_pseudoheader(). +start_test "don't encode text as quoted-printable" +cat >"$expected" <<'EOF' +From: recipient@example.com +To: sender@example.com +cc: +Fcc: +outbox +Subject: Re: test +Comments: In-reply-to sender@example.com + message dated "Thu, 11 Dec 2014 08:19:02 -0600." +MIME-Version: 1.0 +Content-Type: text/plain; charset="US-ASCII" + +sender@example.com writes: + +> This is a very, very, very, very, very, very, very, very, very, very, very, long line. +EOF + +cat >`mhpath new` <<'EOF' +From: sender@example.com +To: recipient@example.com +Subject: test +Date: Thu, 11 Dec 2014 08:19:02 -0600 +Content-Type: multipart/mixed; boundary="_001_" +MIME-Version: 1.0 + +--_001_ +Content-Type: text/plain + +This is a very, very, very, very, very, very, very, very, very, very, very, long line. + +--_001_-- +EOF + +#### Just prefix the text with "> ". +cp "${MH}" "${MH}.new" +cat >>"${MH}.new" < \1/; s/^$/>/;' <%F +EOF +repl -filter mhl.replywithoutbody -convertarg text/plain '' \ + -nowhatnowproc last +MH="${MH}.new" mhbuild "$actual" +rm "${MH}.new" +check "$actual" "$expected" + + #### Make sure that this works with 8-bit encoding. finish_test -require_locale en_US.utf-8 en_US.utf8 -LC_ALL=en_US.UTF-8; export LC_ALL +require_locale en_US.UTF-8 en_US.UTF8 en_US.utf-8 en_US.utf8 # check -convertarg with multiple parts, 7 bit