[PATCH 4/4] test: conform to content-length fields (text)
authorPeter Wang <novalazy@gmail.com>
Sun, 5 Aug 2012 07:22:25 +0000 (17:22 +1000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:48:51 +0000 (09:48 -0800)
94/6ba2f92f6baae96fd5bb4ddd7d5572ae9fac9b [new file with mode: 0644]

diff --git a/94/6ba2f92f6baae96fd5bb4ddd7d5572ae9fac9b b/94/6ba2f92f6baae96fd5bb4ddd7d5572ae9fac9b
new file mode 100644 (file)
index 0000000..99a25ee
--- /dev/null
@@ -0,0 +1,242 @@
+Return-Path: <novalazy@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 65931431FBF\r
+       for <notmuch@notmuchmail.org>; Sun,  5 Aug 2012 00:23:00 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id yhD81x02EihV for <notmuch@notmuchmail.org>;\r
+       Sun,  5 Aug 2012 00:22:59 -0700 (PDT)\r
+Received: from mail-pb0-f53.google.com (mail-pb0-f53.google.com\r
+       [209.85.160.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id BD866431FB6\r
+       for <notmuch@notmuchmail.org>; Sun,  5 Aug 2012 00:22:58 -0700 (PDT)\r
+Received: by mail-pb0-f53.google.com with SMTP id ro8so3935886pbb.26\r
+       for <notmuch@notmuchmail.org>; Sun, 05 Aug 2012 00:22:58 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+       h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
+       bh=ih2RhhTfEv8hjCF/o9vvOovW3JIovK+jhtURw0LHng8=;\r
+       b=pbemADZz3LVjJMSl4eo3E4R4s/CAygwYumv5vXQD60Dp7CeNQLk9UaqppSsmeanpPd\r
+       8MFvR32oNQcfpMEMEy8XgKUvwUYCBpzflKMSZKgwPK2GHRYIo4Ow8OeXdvHFB7nu3VSt\r
+       c/Pqlu+SQ47i5q2RvBhqPDXQF/N5J3+1yEE1DIGsNCWx5vA5omE9bZ4nYULej/CrjAs9\r
+       XQhbLPPX0hls35ke4Xa1VT8OMnjzD73HnrW++Bum0ulKc5GSXc39B9CZl5TrRKWs7flv\r
+       y78k0NiJ6UVQQonaOwCpp8YAnzocmEEolBUl9WlafwLE9OLNSX/pXHCSAWNNnXEZI++B\r
+       +/Pg==\r
+Received: by 10.68.229.2 with SMTP id sm2mr9807808pbc.57.1344151378571;\r
+       Sun, 05 Aug 2012 00:22:58 -0700 (PDT)\r
+Received: from localhost (215.42.233.220.static.exetel.com.au.\r
+       [220.233.42.215])\r
+       by mx.google.com with ESMTPS id qi8sm6409079pbc.36.2012.08.05.00.22.56\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Sun, 05 Aug 2012 00:22:57 -0700 (PDT)\r
+From: Peter Wang <novalazy@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 4/4] test: conform to content-length fields (text)\r
+Date: Sun,  5 Aug 2012 17:22:25 +1000\r
+Message-Id: <1344151345-25411-4-git-send-email-novalazy@gmail.com>\r
+X-Mailer: git-send-email 1.7.4.4\r
+In-Reply-To: <1344151345-25411-1-git-send-email-novalazy@gmail.com>\r
+References: <1344151345-25411-1-git-send-email-novalazy@gmail.com>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 05 Aug 2012 07:23:00 -0000\r
+\r
+Update tests to expect Content-length fields in show --format=text\r
+output, for leaf parts with omitted body content.\r
+---\r
+ test/crypto    |    4 ++--\r
+ test/multipart |   18 +++++++++---------\r
+ 2 files changed, 11 insertions(+), 11 deletions(-)\r
+\r
+diff --git a/test/crypto b/test/crypto\r
+index 4a73dcc..8dfbfa6 100755\r
+--- a/test/crypto\r
++++ b/test/crypto\r
+@@ -161,14 +161,14 @@ Date: Sat, 01 Jan 2000 12:00:00 +0000\r
\f\r
+header}\r
\f\r
+body{\r
\f\r
+part{ ID: 1, Content-type: multipart/encrypted\r
+-\f\r
+part{ ID: 2, Content-type: application/pgp-encrypted\r
++\f\r
+part{ ID: 2, Content-type: application/pgp-encrypted, Content-length: 11\r
+ Non-text part: application/pgp-encrypted\r
\f\r
+part}\r
\f\r
+part{ ID: 3, Content-type: multipart/mixed\r
\f\r
+part{ ID: 4, Content-type: text/plain\r
+ This is a test encrypted message.\r
\f\r
+part}\r
+-\f\r
+attachment{ ID: 5, Filename: TESTATTACHMENT, Content-type: application/octet-stream\r
++\f\r
+attachment{ ID: 5, Filename: TESTATTACHMENT, Content-type: application/octet-stream, Content-length: 28\r
+ Non-text part: application/octet-stream\r
\f\r
+attachment}\r
\f\r
+part}\r
+diff --git a/test/multipart b/test/multipart\r
+index 0f9e113..064e91a 100755\r
+--- a/test/multipart\r
++++ b/test/multipart\r
+@@ -129,7 +129,7 @@ Date: Fri, 05 Jan 2001 15:42:57 +0000\r
\f\r
+header}\r
\f\r
+body{\r
\f\r
+part{ ID: 4, Content-type: multipart/alternative\r
+-\f\r
+part{ ID: 5, Content-type: text/html\r
++\f\r
+part{ ID: 5, Content-type: text/html, Content-length: 71\r
+ Non-text part: text/html\r
\f\r
+part}\r
\f\r
+part{ ID: 6, Content-type: text/plain\r
+@@ -147,7 +147,7 @@ And this message is signed.\r
+ -Carl\r
\f\r
+part}\r
\f\r
+part}\r
+-\f\r
+part{ ID: 9, Content-type: application/pgp-signature\r
++\f\r
+part{ ID: 9, Content-type: application/pgp-signature, Content-length: 197\r
+ Non-text part: application/pgp-signature\r
\f\r
+part}\r
\f\r
+part}\r
+@@ -170,7 +170,7 @@ Date: Fri, 05 Jan 2001 15:42:57 +0000\r
\f\r
+header}\r
\f\r
+body{\r
\f\r
+part{ ID: 4, Content-type: multipart/alternative\r
+-\f\r
+part{ ID: 5, Content-type: text/html\r
++\f\r
+part{ ID: 5, Content-type: text/html, Content-length: 71\r
+ Non-text part: text/html\r
\f\r
+part}\r
\f\r
+part{ ID: 6, Content-type: text/plain\r
+@@ -188,7 +188,7 @@ And this message is signed.\r
+ -Carl\r
\f\r
+part}\r
\f\r
+part}\r
+-\f\r
+part{ ID: 9, Content-type: application/pgp-signature\r
++\f\r
+part{ ID: 9, Content-type: application/pgp-signature, Content-length: 197\r
+ Non-text part: application/pgp-signature\r
\f\r
+part}\r
\f\r
+part}\r
+@@ -208,7 +208,7 @@ Date: Fri, 05 Jan 2001 15:42:57 +0000\r
\f\r
+header}\r
\f\r
+body{\r
\f\r
+part{ ID: 4, Content-type: multipart/alternative\r
+-\f\r
+part{ ID: 5, Content-type: text/html\r
++\f\r
+part{ ID: 5, Content-type: text/html, Content-length: 71\r
+ Non-text part: text/html\r
\f\r
+part}\r
\f\r
+part{ ID: 6, Content-type: text/plain\r
+@@ -241,7 +241,7 @@ Date: Fri, 05 Jan 2001 15:42:57 +0000\r
\f\r
+header}\r
\f\r
+body{\r
\f\r
+part{ ID: 4, Content-type: multipart/alternative\r
+-\f\r
+part{ ID: 5, Content-type: text/html\r
++\f\r
+part{ ID: 5, Content-type: text/html, Content-length: 71\r
+ Non-text part: text/html\r
\f\r
+part}\r
\f\r
+part{ ID: 6, Content-type: text/plain\r
+@@ -257,7 +257,7 @@ test_begin_subtest "--format=text --part=4, rfc822's multipart"\r
+ notmuch show --format=text --part=4 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT\r
+ cat <<EOF >EXPECTED\r
\f\r
+part{ ID: 4, Content-type: multipart/alternative\r
+-\f\r
+part{ ID: 5, Content-type: text/html\r
++\f\r
+part{ ID: 5, Content-type: text/html, Content-length: 71\r
+ Non-text part: text/html\r
\f\r
+part}\r
\f\r
+part{ ID: 6, Content-type: text/plain\r
+@@ -270,7 +270,7 @@ test_expect_equal_file OUTPUT EXPECTED\r
+ test_begin_subtest "--format=text --part=5, rfc822's html part"\r
+ notmuch show --format=text --part=5 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT\r
+ cat <<EOF >EXPECTED\r
+-\f\r
+part{ ID: 5, Content-type: text/html\r
++\f\r
+part{ ID: 5, Content-type: text/html, Content-length: 71\r
+ Non-text part: text/html\r
\f\r
+part}\r
+ EOF\r
+@@ -308,7 +308,7 @@ test_expect_equal_file OUTPUT EXPECTED\r
+ test_begin_subtest "--format=text --part=9, pgp signature (unverified)"\r
+ notmuch show --format=text --part=9 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT\r
+ cat <<EOF >EXPECTED\r
+-\f\r
+part{ ID: 9, Content-type: application/pgp-signature\r
++\f\r
+part{ ID: 9, Content-type: application/pgp-signature, Content-length: 197\r
+ Non-text part: application/pgp-signature\r
\f\r
+part}\r
+ EOF\r
+-- \r
+1.7.4.4\r
+\r