Re: [PATCH v5.2 1/7] test: Add broken test for the new JSON reply format.
authorAustin Clements <amdragon@MIT.EDU>
Fri, 17 Feb 2012 18:20:57 +0000 (13:20 +1900)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:44:38 +0000 (09:44 -0800)
dc/22fa4beb6b40204eb526c8cba4a9627377a0e4 [new file with mode: 0644]

diff --git a/dc/22fa4beb6b40204eb526c8cba4a9627377a0e4 b/dc/22fa4beb6b40204eb526c8cba4a9627377a0e4
new file mode 100644 (file)
index 0000000..f5a800c
--- /dev/null
@@ -0,0 +1,150 @@
+Return-Path: <amdragon@mit.edu>\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 78D90429E42\r
+       for <notmuch@notmuchmail.org>; Fri, 17 Feb 2012 10:22:46 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[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 b6pvXBAnTyzM for <notmuch@notmuchmail.org>;\r
+       Fri, 17 Feb 2012 10:22:44 -0800 (PST)\r
+Received: from dmz-mailsec-scanner-1.mit.edu (DMZ-MAILSEC-SCANNER-1.MIT.EDU\r
+       [18.9.25.12])\r
+       by olra.theworths.org (Postfix) with ESMTP id 59CFA431FB6\r
+       for <notmuch@notmuchmail.org>; Fri, 17 Feb 2012 10:22:44 -0800 (PST)\r
+X-AuditID: 1209190c-b7fad6d000000920-35-4f3e9af303a3\r
+Received: from mailhub-auth-1.mit.edu ( [18.9.21.35])\r
+       by dmz-mailsec-scanner-1.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 9C.07.02336.3FA9E3F4; Fri, 17 Feb 2012 13:22:43 -0500 (EST)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+       by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id q1HIMgK7007037; \r
+       Fri, 17 Feb 2012 13:22:43 -0500\r
+Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
+       (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q1HIMfHc004402\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Fri, 17 Feb 2012 13:22:42 -0500 (EST)\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1RySQT-0003d5-Bb; Fri, 17 Feb 2012 13:20:57 -0500\r
+Date: Fri, 17 Feb 2012 13:20:57 -0500\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: Adam Wolfe Gordon <awg+notmuch@xvx.ca>\r
+Subject: Re: [PATCH v5.2 1/7] test: Add broken test for the new JSON reply\r
+       format.\r
+Message-ID: <20120217182057.GF5991@mit.edu>\r
+References: <1329361957-28493-1-git-send-email-awg+notmuch@xvx.ca>\r
+       <1329361957-28493-2-git-send-email-awg+notmuch@xvx.ca>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+In-Reply-To: <1329361957-28493-2-git-send-email-awg+notmuch@xvx.ca>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFmpmleLIzCtJLcpLzFFi42IR4hRV1v08y87foLnfxOLInlnsFtdvzmR2\r
+       YPJ4tuoWs0fTj8WsAUxRXDYpqTmZZalF+nYJXBkLLi9kL2gQq9i416yBcb1QFyMnh4SAicTD\r
+       rvnsELaYxIV769m6GLk4hAT2MUpMW3uSHcLZwCix/M4ORgjnJJPEh9fXmSGcJYwSV/evZQPp\r
+       ZxFQlVj7pB9sFpuAhsS2/csZQWwRAS2JH+u/soLYzALSEt9+NzOB2MICIRK7Jm1hAbF5BbQl\r
+       erdNAesVEqiW6H/3jQ0iLihxcuYTFoheLYkb/14C9XKAzVn+jwMkzCngLDH3yyKwclEBFYkp\r
+       J7exTWAUmoWkexaS7lkI3QsYmVcxyqbkVunmJmbmFKcm6xYnJ+blpRbpGurlZpbopaaUbmIE\r
+       h7Ukzw7GNweVDjEKcDAq8fC+6rTzF2JNLCuuzD3EKMnBpCTKWz4dKMSXlJ9SmZFYnBFfVJqT\r
+       WnyIUYKDWUmE91suUI43JbGyKrUoHyYlzcGiJM6rovXOT0ggPbEkNTs1tSC1CCYrw8GhJMEr\r
+       BIxfIcGi1PTUirTMnBKENBMHJ8hwHqDhIiA1vMUFibnFmekQ+VOMilLivAYgCQGQREZpHlwv\r
+       LO28YhQHekWYlwWkigeYsuC6XwENZgIazCsENrgkESEl1cDItGfp1qcvGV6cCHQ+ZK5/niPd\r
+       OuCDdu8pQ/Hs//5bqxKjc9MXbYi8GHouoUylc0N2Y/6c0u/XZA682bclfd7idkezIp/lJpG/\r
+       dN4/bSxZoXNGhylHXlHCncdc6G9ibYDsxSD+c2G7pXaf5JviNHuHx5eS8ujZNZo2ttYHuROf\r
+       ipbLuXUnXVZiKc5INNRiLipOBABweWRjFgMAAA==\r
+Cc: notmuch@notmuchmail.org\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: Fri, 17 Feb 2012 18:22:46 -0000\r
+\r
+One nit, actually.  It would good if this test were marked\r
+test_subtest_known_broken by this patch and then unmarked broken by\r
+the patch that adds the JSON reply format so that the test doesn't\r
+outright fail at any point in the history.\r
+\r
+Quoth Adam Wolfe Gordon on Feb 15 at  8:12 pm:\r
+> ---\r
+>  test/multipart |   51 +++++++++++++++++++++++++++++++++++++++++++++++++++\r
+>  1 files changed, 51 insertions(+), 0 deletions(-)\r
+> \r
+> diff --git a/test/multipart b/test/multipart\r
+> index a3036b4..e7abcc2 100755\r
+> --- a/test/multipart\r
+> +++ b/test/multipart\r
+> @@ -589,6 +589,57 @@ 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' | 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
+> + "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