[PATCH v2 1/4] test: Add broken test for the new JSON reply format.
authorAdam Wolfe Gordon <awg+notmuch@xvx.ca>
Mon, 16 Jan 2012 18:13:20 +0000 (11:13 +1700)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:42:18 +0000 (09:42 -0800)
4a/506cf8d243d10fbb67db94106cde044ca06885 [new file with mode: 0644]

diff --git a/4a/506cf8d243d10fbb67db94106cde044ca06885 b/4a/506cf8d243d10fbb67db94106cde044ca06885
new file mode 100644 (file)
index 0000000..698516f
--- /dev/null
@@ -0,0 +1,79 @@
+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 3BB34429E26\r
+       for <notmuch@notmuchmail.org>; Mon, 16 Jan 2012 10:13:50 -0800 (PST)\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\r
+       tests=[RCVD_IN_DNSWL_NONE=-0.0001] 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 b-NUeeLxiv7m for <notmuch@notmuchmail.org>;\r
+       Mon, 16 Jan 2012 10:13:48 -0800 (PST)\r
+Received: from idcmail-mo1so.shaw.ca (idcmail-mo1so.shaw.ca [24.71.223.10])\r
+       by olra.theworths.org (Postfix) with ESMTP id DC978431FB6\r
+       for <notmuch@notmuchmail.org>; Mon, 16 Jan 2012 10:13:47 -0800 (PST)\r
+Received: from pd4ml1so-ssvc.prod.shaw.ca ([10.0.141.141])\r
+       by pd2mo1so-svcs.prod.shaw.ca with ESMTP; 16 Jan 2012 11:13:47 -0700\r
+X-Cloudmark-SP-Filtered: true\r
+X-Cloudmark-SP-Result: v=1.1 cv=zu4PKjlF+9DoPrG/TPTQ4CC8dREy1gI1uGhqrRhVwqE=\r
+       c=1 sm=1\r
+       a=bvXRxmw3sC0A:10 a=BLceEmwcHowA:10 a=yQp6g8lIsgqumF79BAsFDg==:17\r
+       a=bz-zy3QpAAAA:8 a=7343-z1_AAAA:8 a=zdyeZAWpJ2uQdTp3UlkA:9\r
+       a=8RRnNBo1tgW-nQP7ESsA:7 a=NFWI-YhVVZsA:10 a=GjjSzUO_F3QA:10\r
+       a=0c-eHkXYtrgA:10 a=pIMJlJgVeHwA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117\r
+Received: from unknown (HELO lagos.xvx.ca) ([96.52.216.56])\r
+       by pd4ml1so-dmz.prod.shaw.ca with ESMTP; 16 Jan 2012 11:13:47 -0700\r
+Received: by lagos.xvx.ca (Postfix, from userid 1000)\r
+       id 622D88004208; Mon, 16 Jan 2012 11:13:47 -0700 (MST)\r
+From: Adam Wolfe Gordon <awg+notmuch@xvx.ca>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2 1/4] test: Add broken test for the new JSON reply format.\r
+Date: Mon, 16 Jan 2012 11:13:20 -0700\r
+Message-Id: <1326737603-21166-2-git-send-email-awg+notmuch@xvx.ca>\r
+X-Mailer: git-send-email 1.7.5.4\r
+In-Reply-To: <1326737603-21166-1-git-send-email-awg+notmuch@xvx.ca>\r
+References: <1326737603-21166-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: Mon, 16 Jan 2012 18:13:50 -0000\r
+\r
+---\r
+ test/multipart |    7 +++++++\r
+ 1 files changed, 7 insertions(+), 0 deletions(-)\r
+\r
+diff --git a/test/multipart b/test/multipart\r
+index f83526b..f5ebf04 100755\r
+--- a/test/multipart\r
++++ b/test/multipart\r
+@@ -589,6 +589,13 @@ 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
++notmuch reply --format=json 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT\r
++cat <<EOF >EXPECTED\r
++[{ "reply": { "headers": { "from": "Notmuch Test Suite <test_suite@notmuchmail.org>", "to": "Carl Worth <cworth@cworth.org>, cworth@cworth.org", "subject": "Re: Multipart message", "in-reply-to": "<87liy5ap00.fsf@yoom.home.cworth.org>", "references": " <87liy5ap00.fsf@yoom.home.cworth.org>"} }, "original": { "headers": { "from": "Carl Worth <cworth@cworth.org>", "to": "cworth@cworth.org", "cc": "", "subject": "Multipart message", "date": "Fri, 05 Jan 2001 15:43:57 +0000", "in-reply-to": "", "references": "" }, "body": [ { "content-type": "text/html", "content": "<p>This is an embedded message, with a multipart/alternative part.</p>\n"}, { "content-type": "text/plain", "content": "This is an embedded message, with a multipart/alternative part.\n"}, { "content-type": "text/plain", "content": "And this message is signed.\n\n-Carl\n"}, {} ] } }, {} ]\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