]> diplodocus.org Git - nmh/blobdiff - test/repl/test-convert
Another fix to convertarg handling of multipart/related. Two,
[nmh] / test / repl / test-convert
index a651957..fd1d1f6 100755 (executable)
@@ -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