X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/c87ca5ccad142a07c63368e44b698992af17ad5c..3a9d1ae106f135d9d6524284c02ae2bea424ca8b:/test/repl/test-convert diff --git a/test/repl/test-convert b/test/repl/test-convert index a651957a..fd1d1f6f 100755 --- a/test/repl/test-convert +++ b/test/repl/test-convert @@ -20,7 +20,7 @@ actual=`mhpath +`/draft printf 'Local-Mailbox: recipient@example.com' >>"$MH" -# check -convertarg with multiple parts and no additional text in draft +# check -convertarg with multiple parts and additional text in draft cat >"$expected" <<'EOF' From: recipient@example.com To: sender@example.com @@ -74,7 +74,7 @@ require_locale en_US.utf-8 en_US.utf8 LC_ALL=en_US.UTF-8; export LC_ALL -# check -convertarg with multiple parts and additional text in draft +# check -convertarg with multiple parts and no additional text in draft cat >"$expected" <<'EOF' From: recipient@example.com To: sender@example.com @@ -120,4 +120,47 @@ mhbuild "$actual" check "$actual" "$expected" +# check message with text part in multipart/related +cat >"$expected" <<'EOF' +From: recipient@example.com +To: sender@example.com +cc: +Fcc: +outbox +Subject: Re: test with text part in multipart/related +Comments: In-reply-to sender@example.com + message dated "." +MIME-Version: 1.0 +Content-Type: text/plain; charset="UTF-8" +Content-Transfer-Encoding: 8bit + +sender@example.com writes: + +> This is a test. +EOF + +cat >`mhpath new` <<'EOF' +From: sender@example.com +To: recipient@example.com +Subject: test with text part in multipart/related +Content-Type: multipart/alternative; boundary="_001_" +MIME-Version: 1.0 + +--_001_ +Content-Type: multipart/related; type="text/plain"; boundary="_002_" + +--_002_ +Content-Type: text/plain + +This is a test. + +--_002_-- + +--_001_-- +EOF + +repl -filter mhl.replywithoutbody -convertarg text/plain '' -nowhatnowproc last +mhbuild "$actual" +check "$actual" "$expected" + + exit $failed