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 1D7F7429E25 for ; Thu, 10 Nov 2011 16:19:52 -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 0CH-ig8EDvnb for ; Thu, 10 Nov 2011 16:19:51 -0800 (PST) Received: from mail-ww0-f41.google.com (mail-ww0-f41.google.com [74.125.82.41]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 53596431FB6 for ; Thu, 10 Nov 2011 16:19:51 -0800 (PST) Received: by wwf25 with SMTP id 25so1308338wwf.2 for ; Thu, 10 Nov 2011 16:19:45 -0800 (PST) Received: by 10.227.199.197 with SMTP id et5mr5461208wbb.2.1320970785030; Thu, 10 Nov 2011 16:19:45 -0800 (PST) Received: from localhost (26.48-242-81.adsl-dyn.isp.belgacom.be. [81.242.48.26]) by mx.google.com with ESMTPS id e7sm11462857wbh.12.2011.11.10.16.19.43 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 10 Nov 2011 16:19:44 -0800 (PST) From: Pieter Praet To: Dmitry Kurochkin , notmuch@notmuchmail.org Subject: Re: [PATCH] test: json show format of message with inline attachment with filename In-Reply-To: <1309485830-32666-1-git-send-email-dmitry.kurochkin@gmail.com> References: <1309485830-32666-1-git-send-email-dmitry.kurochkin@gmail.com> User-Agent: Notmuch/0.9+37~g8861220 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-unknown-linux-gnu) Date: Fri, 11 Nov 2011 01:18:56 +0100 Message-ID: <87ehxftssv.fsf@praet.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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, 11 Nov 2011 00:19:52 -0000 On Fri, 1 Jul 2011 06:03:50 +0400, Dmitry Kurochkin wrote: > The patch adds a test to check that json show format includes > filenames for attachments with inline disposition. > --- >=20 > Carl, I owe you this test case for my patch that added filenames > for inline attachments :) >=20 > Regards, > Dmitry >=20 > test/json | 13 +++++++++++++ > 1 files changed, 13 insertions(+), 0 deletions(-) >=20 > diff --git a/test/json b/test/json > index 5a2544c..592b068 100755 > --- a/test/json > +++ b/test/json > @@ -23,6 +23,19 @@ add_message "[subject]=3D\"json-show-utf8-body-s=C3=BC= bj=C3=A9ct\"" "[date]=3D\"Sat, 01 Jan > output=3D$(notmuch show --format=3Djson "js=C3=B6n-show-m=C3=A9ssage") > test_expect_equal "$output" "[[[{\"id\": \"${gen_msg_id}\", \"match\": t= rue, \"filename\": \"${gen_msg_filename}\", \"timestamp\": 946728000, \"dat= e_relative\": \"2000-01-01\", \"tags\": [\"inbox\",\"unread\"], \"headers\"= : {\"Subject\": \"json-show-utf8-body-s=C3=BCbj=C3=A9ct\", \"From\": \"Notm= uch Test Suite \", \"To\": \"Notmuch Test Suite= \", \"Cc\": \"\", \"Bcc\": \"\", \"Date\": \"S= at, 01 Jan 2000 12:00:00 -0000\"}, \"body\": [{\"id\": 1, \"content-type\":= \"text/plain\", \"content\": \"js=C3=B6n-show-m=C3=A9ssage\n\"}]}, []]]]" >=20=20 > +test_begin_subtest "Show message: json, inline attachment filename" > +subject=3D'json-show-inline-attachment-filename' > +id=3D"json-show-inline-attachment-filename@notmuchmail.org" > +emacs_deliver_message \ > + "$subject" \ > + 'This is a test message with inline attachment with a filename' \ > + "(mml-attach-file \"$TEST_DIRECTORY/README\" nil nil \"inline\") > + (message-goto-eoh) > + (insert \"Message-ID: <$id>\n\")" > +output=3D$(notmuch show --format=3Djson "id:$id") > +filename=3D$(notmuch search --output=3Dfiles "id:$id") > +test_expect_equal "$output" "[[[{\"id\": \"$id\", \"match\": true, \"fil= ename\": \"$filename\", \"timestamp\": 946728000, \"date_relative\": \"2000= -01-01\", \"tags\": [\"inbox\"], \"headers\": {\"Subject\": \"$subject\", \= "From\": \"Notmuch Test Suite \", \"To\": \"tes= t_suite@notmuchmail.org\", \"Cc\": \"\", \"Bcc\": \"\", \"Date\": \"01 Jan = 2000 12:00:00 -0000\"}, \"body\": [{\"id\": 1, \"content-type\": \"multipar= t/mixed\", \"content\": [{\"id\": 2, \"content-type\": \"text/plain\", \"co= ntent\": \"This is a test message with inline attachment with a filename\"}= , {\"id\": 3, \"content-type\": \"application/octet-stream\", \"filename\":= \"README\"}]}]}, []]]]" > + > test_begin_subtest "Search message: json, utf-8" > add_message "[subject]=3D\"json-search-utf8-body-s=C3=BCbj=C3=A9ct\"" "[= date]=3D\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=3D\"js=C3=B6n-search-m= =C3=A9ssage\"" > output=3D$(notmuch search --format=3Djson "js=C3=B6n-search-m=C3=A9ssage= " | notmuch_search_sanitize) > --=20 > 1.7.5.4 >=20 > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch Appears to have been merged in by the powers that be: commit 749abb74 Thanks! Peace --=20 Pieter