Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 78D90429E42 for ; Fri, 17 Feb 2012 10:22:46 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id b6pvXBAnTyzM for ; Fri, 17 Feb 2012 10:22:44 -0800 (PST) Received: from dmz-mailsec-scanner-1.mit.edu (DMZ-MAILSEC-SCANNER-1.MIT.EDU [18.9.25.12]) by olra.theworths.org (Postfix) with ESMTP id 59CFA431FB6 for ; Fri, 17 Feb 2012 10:22:44 -0800 (PST) X-AuditID: 1209190c-b7fad6d000000920-35-4f3e9af303a3 Received: from mailhub-auth-1.mit.edu ( [18.9.21.35]) by dmz-mailsec-scanner-1.mit.edu (Symantec Messaging Gateway) with SMTP id 9C.07.02336.3FA9E3F4; Fri, 17 Feb 2012 13:22:43 -0500 (EST) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id q1HIMgK7007037; Fri, 17 Feb 2012 13:22:43 -0500 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) (authenticated bits=0) (User authenticated as amdragon@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q1HIMfHc004402 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Fri, 17 Feb 2012 13:22:42 -0500 (EST) Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77) (envelope-from ) id 1RySQT-0003d5-Bb; Fri, 17 Feb 2012 13:20:57 -0500 Date: Fri, 17 Feb 2012 13:20:57 -0500 From: Austin Clements To: Adam Wolfe Gordon Subject: Re: [PATCH v5.2 1/7] test: Add broken test for the new JSON reply format. Message-ID: <20120217182057.GF5991@mit.edu> References: <1329361957-28493-1-git-send-email-awg+notmuch@xvx.ca> <1329361957-28493-2-git-send-email-awg+notmuch@xvx.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1329361957-28493-2-git-send-email-awg+notmuch@xvx.ca> User-Agent: Mutt/1.5.21 (2010-09-15) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpmleLIzCtJLcpLzFFi42IR4hRV1v08y87foLnfxOLInlnsFtdvzmR2 YPJ4tuoWs0fTj8WsAUxRXDYpqTmZZalF+nYJXBkLLi9kL2gQq9i416yBcb1QFyMnh4SAicTD rvnsELaYxIV769m6GLk4hAT2MUpMW3uSHcLZwCix/M4ORgjnJJPEh9fXmSGcJYwSV/evZQPp ZxFQlVj7pB9sFpuAhsS2/csZQWwRAS2JH+u/soLYzALSEt9+NzOB2MICIRK7Jm1hAbF5BbQl erdNAesVEqiW6H/3jQ0iLihxcuYTFoheLYkb/14C9XKAzVn+jwMkzCngLDH3yyKwclEBFYkp J7exTWAUmoWkexaS7lkI3QsYmVcxyqbkVunmJmbmFKcm6xYnJ+blpRbpGurlZpbopaaUbmIE h7Ukzw7GNweVDjEKcDAq8fC+6rTzF2JNLCuuzD3EKMnBpCTKWz4dKMSXlJ9SmZFYnBFfVJqT WnyIUYKDWUmE91suUI43JbGyKrUoHyYlzcGiJM6rovXOT0ggPbEkNTs1tSC1CCYrw8GhJMEr BIxfIcGi1PTUirTMnBKENBMHJ8hwHqDhIiA1vMUFibnFmekQ+VOMilLivAYgCQGQREZpHlwv LO28YhQHekWYlwWkigeYsuC6XwENZgIazCsENrgkESEl1cDItGfp1qcvGV6cCHQ+ZK5/niPd OuCDdu8pQ/Hs//5bqxKjc9MXbYi8GHouoUylc0N2Y/6c0u/XZA682bclfd7idkezIp/lJpG/ dN4/bSxZoXNGhylHXlHCncdc6G9ibYDsxSD+c2G7pXaf5JviNHuHx5eS8ujZNZo2ttYHuROf ipbLuXUnXVZiKc5INNRiLipOBABweWRjFgMAAA== Cc: notmuch@notmuchmail.org X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Feb 2012 18:22:46 -0000 One nit, actually. It would good if this test were marked test_subtest_known_broken by this patch and then unmarked broken by the patch that adds the JSON reply format so that the test doesn't outright fail at any point in the history. Quoth Adam Wolfe Gordon on Feb 15 at 8:12 pm: > --- > test/multipart | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ > 1 files changed, 51 insertions(+), 0 deletions(-) > > diff --git a/test/multipart b/test/multipart > index a3036b4..e7abcc2 100755 > --- a/test/multipart > +++ b/test/multipart > @@ -589,6 +589,57 @@ Non-text part: text/html > EOF > test_expect_equal_file OUTPUT EXPECTED > > +test_begin_subtest "'notmuch reply' to a multipart message with json format" > +notmuch reply --format=json 'id:87liy5ap00.fsf@yoom.home.cworth.org' | notmuch_json_show_sanitize >OUTPUT > +cat <EXPECTED > +{"reply-headers": {"Subject": "Re: Multipart message", > + "From": "Notmuch Test Suite ", > + "To": "Carl Worth , > + cworth@cworth.org", > + "In-reply-to": "<87liy5ap00.fsf@yoom.home.cworth.org>", > + "References": " <87liy5ap00.fsf@yoom.home.cworth.org>"}, > + "original": {"id": "XXXXX", > + "match": false, > + "filename": "YYYYY", > + "timestamp": 978709437, > + "date_relative": "2001-01-05", > + "tags": ["attachment","inbox","signed","unread"], > + "headers": {"Subject": "Multipart message", > + "From": "Carl Worth ", > + "To": "cworth@cworth.org", > + "Date": "Fri, > + 05 Jan 2001 15:43:57 +0000"}, > + "body": [{"id": 1, > + "content-type": "multipart/signed", > + "content": [{"id": 2, > + "content-type": "multipart/mixed", > + "content": [{"id": 3, > + "content-type": "message/rfc822", > + "content": [{"headers": {"Subject": "html message", > + "From": "Carl Worth ", > + "To": "cworth@cworth.org", > + "Date": "Fri, > + 05 Jan 2001 15:42:57 +0000"}, > + "body": [{"id": 4, > + "content-type": "multipart/alternative", > + "content": [{"id": 5, > + "content-type": "text/html"}, > + {"id": 6, > + "content-type": "text/plain", > + "content": "This is an embedded message, > + with a multipart/alternative part.\n"}]}]}]}, > + {"id": 7, > + "content-type": "text/plain", > + "filename": "YYYYY", > + "content": "This is a text attachment.\n"}, > + {"id": 8, > + "content-type": "text/plain", > + "content": "And this message is signed.\n\n-Carl\n"}]}, > + {"id": 9, > + "content-type": "application/pgp-signature"}]}]}} > +EOF > +test_expect_equal_file OUTPUT EXPECTED > + > test_begin_subtest "'notmuch show --part' does not corrupt a part with CRLF pair" > notmuch show --format=raw --part=3 id:base64-part-with-crlf > crlf.out > echo -n -e "\xEF\x0D\x0A" > crlf.expected