1 Return-Path: <pieter@praet.org>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 1D7F7429E25
\r
6 for <notmuch@notmuchmail.org>; Thu, 10 Nov 2011 16:19:52 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id 0CH-ig8EDvnb for <notmuch@notmuchmail.org>;
\r
16 Thu, 10 Nov 2011 16:19:51 -0800 (PST)
\r
17 Received: from mail-ww0-f41.google.com (mail-ww0-f41.google.com
\r
18 [74.125.82.41]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client
\r
19 certificate requested) by olra.theworths.org (Postfix) with ESMTPS id
\r
20 53596431FB6 for <notmuch@notmuchmail.org>; Thu, 10 Nov 2011 16:19:51 -0800
\r
22 Received: by wwf25 with SMTP id 25so1308338wwf.2
\r
23 for <notmuch@notmuchmail.org>; Thu, 10 Nov 2011 16:19:45 -0800 (PST)
\r
24 Received: by 10.227.199.197 with SMTP id et5mr5461208wbb.2.1320970785030;
\r
25 Thu, 10 Nov 2011 16:19:45 -0800 (PST)
\r
26 Received: from localhost (26.48-242-81.adsl-dyn.isp.belgacom.be.
\r
28 by mx.google.com with ESMTPS id e7sm11462857wbh.12.2011.11.10.16.19.43
\r
29 (version=TLSv1/SSLv3 cipher=OTHER);
\r
30 Thu, 10 Nov 2011 16:19:44 -0800 (PST)
\r
31 From: Pieter Praet <pieter@praet.org>
\r
32 To: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>, notmuch@notmuchmail.org
\r
33 Subject: Re: [PATCH] test: json show format of message with inline attachment
\r
35 In-Reply-To: <1309485830-32666-1-git-send-email-dmitry.kurochkin@gmail.com>
\r
36 References: <1309485830-32666-1-git-send-email-dmitry.kurochkin@gmail.com>
\r
37 User-Agent: Notmuch/0.9+37~g8861220 (http://notmuchmail.org) Emacs/23.3.1
\r
38 (x86_64-unknown-linux-gnu)
\r
39 Date: Fri, 11 Nov 2011 01:18:56 +0100
\r
40 Message-ID: <87ehxftssv.fsf@praet.org>
\r
42 Content-Type: text/plain; charset=utf-8
\r
43 Content-Transfer-Encoding: quoted-printable
\r
44 X-BeenThere: notmuch@notmuchmail.org
\r
45 X-Mailman-Version: 2.1.13
\r
47 List-Id: "Use and development of the notmuch mail system."
\r
48 <notmuch.notmuchmail.org>
\r
49 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
50 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
51 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
52 List-Post: <mailto:notmuch@notmuchmail.org>
\r
53 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
54 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
55 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
56 X-List-Received-Date: Fri, 11 Nov 2011 00:19:52 -0000
\r
58 On Fri, 1 Jul 2011 06:03:50 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmai=
\r
60 > The patch adds a test to check that json show format includes
\r
61 > filenames for attachments with inline disposition.
\r
64 > Carl, I owe you this test case for my patch that added filenames
\r
65 > for inline attachments :)
\r
70 > test/json | 13 +++++++++++++
\r
71 > 1 files changed, 13 insertions(+), 0 deletions(-)
\r
73 > diff --git a/test/json b/test/json
\r
74 > index 5a2544c..592b068 100755
\r
77 > @@ -23,6 +23,19 @@ add_message "[subject]=3D\"json-show-utf8-body-s=C3=BC=
\r
78 bj=C3=A9ct\"" "[date]=3D\"Sat, 01 Jan
\r
79 > output=3D$(notmuch show --format=3Djson "js=C3=B6n-show-m=C3=A9ssage")
\r
80 > test_expect_equal "$output" "[[[{\"id\": \"${gen_msg_id}\", \"match\": t=
\r
81 rue, \"filename\": \"${gen_msg_filename}\", \"timestamp\": 946728000, \"dat=
\r
82 e_relative\": \"2000-01-01\", \"tags\": [\"inbox\",\"unread\"], \"headers\"=
\r
83 : {\"Subject\": \"json-show-utf8-body-s=C3=BCbj=C3=A9ct\", \"From\": \"Notm=
\r
84 uch Test Suite <test_suite@notmuchmail.org>\", \"To\": \"Notmuch Test Suite=
\r
85 <test_suite@notmuchmail.org>\", \"Cc\": \"\", \"Bcc\": \"\", \"Date\": \"S=
\r
86 at, 01 Jan 2000 12:00:00 -0000\"}, \"body\": [{\"id\": 1, \"content-type\":=
\r
87 \"text/plain\", \"content\": \"js=C3=B6n-show-m=C3=A9ssage\n\"}]}, []]]]"
\r
89 > +test_begin_subtest "Show message: json, inline attachment filename"
\r
90 > +subject=3D'json-show-inline-attachment-filename'
\r
91 > +id=3D"json-show-inline-attachment-filename@notmuchmail.org"
\r
92 > +emacs_deliver_message \
\r
94 > + 'This is a test message with inline attachment with a filename' \
\r
95 > + "(mml-attach-file \"$TEST_DIRECTORY/README\" nil nil \"inline\")
\r
96 > + (message-goto-eoh)
\r
97 > + (insert \"Message-ID: <$id>\n\")"
\r
98 > +output=3D$(notmuch show --format=3Djson "id:$id")
\r
99 > +filename=3D$(notmuch search --output=3Dfiles "id:$id")
\r
100 > +test_expect_equal "$output" "[[[{\"id\": \"$id\", \"match\": true, \"fil=
\r
101 ename\": \"$filename\", \"timestamp\": 946728000, \"date_relative\": \"2000=
\r
102 -01-01\", \"tags\": [\"inbox\"], \"headers\": {\"Subject\": \"$subject\", \=
\r
103 "From\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"To\": \"tes=
\r
104 t_suite@notmuchmail.org\", \"Cc\": \"\", \"Bcc\": \"\", \"Date\": \"01 Jan =
\r
105 2000 12:00:00 -0000\"}, \"body\": [{\"id\": 1, \"content-type\": \"multipar=
\r
106 t/mixed\", \"content\": [{\"id\": 2, \"content-type\": \"text/plain\", \"co=
\r
107 ntent\": \"This is a test message with inline attachment with a filename\"}=
\r
108 , {\"id\": 3, \"content-type\": \"application/octet-stream\", \"filename\":=
\r
109 \"README\"}]}]}, []]]]"
\r
111 > test_begin_subtest "Search message: json, utf-8"
\r
112 > add_message "[subject]=3D\"json-search-utf8-body-s=C3=BCbj=C3=A9ct\"" "[=
\r
113 date]=3D\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=3D\"js=C3=B6n-search-m=
\r
115 > output=3D$(notmuch search --format=3Djson "js=C3=B6n-search-m=C3=A9ssage=
\r
116 " | notmuch_search_sanitize)
\r
120 > _______________________________________________
\r
121 > notmuch mailing list
\r
122 > notmuch@notmuchmail.org
\r
123 > http://notmuchmail.org/mailman/listinfo/notmuch
\r
125 Appears to have been merged in by the powers that be: commit 749abb74
\r