[PATCH v7.1 01/11] test: Add broken test for the new JSON reply format.
authorAdam Wolfe Gordon <awg+notmuch@xvx.ca>
Wed, 14 Mar 2012 04:30:06 +0000 (22:30 +1800)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:45:28 +0000 (09:45 -0800)
56/4407936af382025e96869c26812f8d84ec64aa [new file with mode: 0644]

diff --git a/56/4407936af382025e96869c26812f8d84ec64aa b/56/4407936af382025e96869c26812f8d84ec64aa
new file mode 100644 (file)
index 0000000..f79cef3
--- /dev/null
@@ -0,0 +1,128 @@
+Return-Path: <awg@lagos.xvx.ca>\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 0E98F431FAE\r
+       for <notmuch@notmuchmail.org>; Tue, 13 Mar 2012 21:30:23 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+       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 49R2aiwKzRrQ for <notmuch@notmuchmail.org>;\r
+       Tue, 13 Mar 2012 21:30:22 -0700 (PDT)\r
+Received: from smtp-out-04.shaw.ca (smtp-out-04.shaw.ca [64.59.134.12])\r
+       by olra.theworths.org (Postfix) with ESMTP id 4688A431FAF\r
+       for <notmuch@notmuchmail.org>; Tue, 13 Mar 2012 21:30:22 -0700 (PDT)\r
+Received: from lb7f8hsrpno-svcs.dcs.int.inet (HELO pd7ml1no-ssvc.prod.shaw.ca)\r
+       ([10.0.144.222])\r
+       by pd5mo1no-svcs.prod.shaw.ca with ESMTP; 13 Mar 2012 22:30:21 -0600\r
+X-Cloudmark-SP-Filtered: true\r
+X-Cloudmark-SP-Result: v=1.1 cv=Ro8QOmc0aMDfanRtxUddlQ8SbE2D0zCZP8MBHZpYE5w=\r
+       c=1 sm=1\r
+       a=Q0bTnv93de0A:10 a=BLceEmwcHowA:10 a=yQp6g8lIsgqumF79BAsFDg==:17\r
+       a=bz-zy3QpAAAA:8 a=7343-z1_AAAA:8 a=k6VnKhIuyadO14Jm798A:9\r
+       a=s2o6Fy0JUDKob3p5bcsA:7 a=NFWI-YhVVZsA:10 a=0c-eHkXYtrgA:10\r
+       a=pIMJlJgVeHwA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117\r
+Received: from unknown (HELO lagos.xvx.ca) ([96.52.216.56])\r
+       by pd7ml1no-dmz.prod.shaw.ca with ESMTP; 13 Mar 2012 22:30:21 -0600\r
+Received: by lagos.xvx.ca (Postfix, from userid 1000)\r
+       id ACA73800422C; Tue, 13 Mar 2012 22:30:20 -0600 (MDT)\r
+From: Adam Wolfe Gordon <awg+notmuch@xvx.ca>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v7.1 01/11] test: Add broken test for the new JSON reply\r
+       format.\r
+Date: Tue, 13 Mar 2012 22:30:06 -0600\r
+Message-Id: <1331699416-30775-2-git-send-email-awg+notmuch@xvx.ca>\r
+X-Mailer: git-send-email 1.7.5.4\r
+In-Reply-To: <1331699416-30775-1-git-send-email-awg+notmuch@xvx.ca>\r
+References: <1331525142-30539-1-git-send-email-awg+notmuch@xvx.ca>\r
+       <1331699416-30775-1-git-send-email-awg+notmuch@xvx.ca>\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: Wed, 14 Mar 2012 04:30:23 -0000\r
+\r
+---\r
+ test/multipart |   53 +++++++++++++++++++++++++++++++++++++++++++++++++++++\r
+ 1 files changed, 53 insertions(+), 0 deletions(-)\r
+\r
+diff --git a/test/multipart b/test/multipart\r
+index 53782c6..80d6e88 100755\r
+--- a/test/multipart\r
++++ b/test/multipart\r
+@@ -589,6 +589,59 @@ Non-text part: text/html\r
+ EOF\r
+ test_expect_equal_file OUTPUT EXPECTED\r
\r
++test_begin_subtest "'notmuch reply' to a multipart message with json format"\r
++test_subtest_known_broken\r
++notmuch reply --format=json 'id:87liy5ap00.fsf@yoom.home.cworth.org' | notmuch_json_show_sanitize >OUTPUT\r
++cat <<EOF >EXPECTED\r
++{"reply-headers": {"Subject": "Re: Multipart message",\r
++ "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",\r
++ "To": "Carl Worth <cworth@cworth.org>,\r
++ cworth@cworth.org",\r
++ "In-reply-to": "<87liy5ap00.fsf@yoom.home.cworth.org>",\r
++ "References": " <87liy5ap00.fsf@yoom.home.cworth.org>"},\r
++ "original": {"id": "XXXXX",\r
++ "match": false,\r
++ "excluded": false,\r
++ "filename": "YYYYY",\r
++ "timestamp": 978709437,\r
++ "date_relative": "2001-01-05",\r
++ "tags": ["attachment","inbox","signed","unread"],\r
++ "headers": {"Subject": "Multipart message",\r
++ "From": "Carl Worth <cworth@cworth.org>",\r
++ "To": "cworth@cworth.org",\r
++ "Date": "Fri,\r
++ 05 Jan 2001 15:43:57 +0000"},\r
++ "body": [{"id": 1,\r
++ "content-type": "multipart/signed",\r
++ "content": [{"id": 2,\r
++ "content-type": "multipart/mixed",\r
++ "content": [{"id": 3,\r
++ "content-type": "message/rfc822",\r
++ "content": [{"headers": {"Subject": "html message",\r
++ "From": "Carl Worth <cworth@cworth.org>",\r
++ "To": "cworth@cworth.org",\r
++ "Date": "Fri,\r
++ 05 Jan 2001 15:42:57 +0000"},\r
++ "body": [{"id": 4,\r
++ "content-type": "multipart/alternative",\r
++ "content": [{"id": 5,\r
++ "content-type": "text/html"},\r
++ {"id": 6,\r
++ "content-type": "text/plain",\r
++ "content": "This is an embedded message,\r
++ with a multipart/alternative part.\n"}]}]}]},\r
++ {"id": 7,\r
++ "content-type": "text/plain",\r
++ "filename": "YYYYY",\r
++ "content": "This is a text attachment.\n"},\r
++ {"id": 8,\r
++ "content-type": "text/plain",\r
++ "content": "And this message is signed.\n\n-Carl\n"}]},\r
++ {"id": 9,\r
++ "content-type": "application/pgp-signature"}]}]}}\r
++EOF\r
++test_expect_equal_file OUTPUT EXPECTED\r
++\r
+ test_begin_subtest "'notmuch show --part' does not corrupt a part with CRLF pair"\r
+ notmuch show --format=raw --part=3 id:base64-part-with-crlf > crlf.out\r
+ echo -n -e "\xEF\x0D\x0A" > crlf.expected\r
+-- \r
+1.7.5.4\r
+\r