1 Return-Path: <dmitry.kurochkin@gmail.com>
\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 BE089431FAF
\r
6 for <notmuch@notmuchmail.org>; Mon, 20 Feb 2012 04:46:00 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id O5nZU+U7Qerw for <notmuch@notmuchmail.org>;
\r
17 Mon, 20 Feb 2012 04:45:56 -0800 (PST)
\r
18 Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com
\r
19 [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id 86952431FAE
\r
22 for <notmuch@notmuchmail.org>; Mon, 20 Feb 2012 04:45:56 -0800 (PST)
\r
23 Received: by bkcit16 with SMTP id it16so5139342bkc.26
\r
24 for <notmuch@notmuchmail.org>; Mon, 20 Feb 2012 04:45:55 -0800 (PST)
\r
25 Received-SPF: pass (google.com: domain of dmitry.kurochkin@gmail.com
\r
26 designates 10.204.143.145 as permitted sender)
\r
27 client-ip=10.204.143.145;
\r
28 Authentication-Results: mr.google.com; spf=pass (google.com: domain of
\r
29 dmitry.kurochkin@gmail.com designates 10.204.143.145 as
\r
30 permitted sender) smtp.mail=dmitry.kurochkin@gmail.com;
\r
31 dkim=pass header.i=dmitry.kurochkin@gmail.com
\r
32 Received: from mr.google.com ([10.204.143.145])
\r
33 by 10.204.143.145 with SMTP id v17mr11267767bku.20.1329741955168
\r
34 (num_hops = 1); Mon, 20 Feb 2012 04:45:55 -0800 (PST)
\r
35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
\r
36 h=from:to:subject:in-reply-to:references:user-agent:date:message-id
\r
37 :mime-version:content-type;
\r
38 bh=zcONjoXh7+YzMapg1a0gbteCyQbur024a0eAAfCNiyc=;
\r
39 b=arcyeCF6EaSzP0T63F3JwKmAD4So/8W68EL4IBqarQ9eaWV+DcN0wzkRm0B5sSLvGY
\r
40 o0pgEMlw8AgkrDJMtt1L8nWoSEaom9JIshkgyGyHeENI/vHA5J83LrVtojLLKpTMOHwF
\r
41 LYr6orW0oaUjo+6ER3GcNDPQCaXqAwyg92R+Y=
\r
42 Received: by 10.204.143.145 with SMTP id v17mr9095242bku.20.1329741955083;
\r
43 Mon, 20 Feb 2012 04:45:55 -0800 (PST)
\r
44 Received: from localhost ([91.144.186.21])
\r
45 by mx.google.com with ESMTPS id fw2sm2933497bkc.13.2012.02.20.04.45.53
\r
46 (version=TLSv1/SSLv3 cipher=OTHER);
\r
47 Mon, 20 Feb 2012 04:45:54 -0800 (PST)
\r
48 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
\r
49 To: Pieter Praet <pieter@praet.org>, Notmuch Mail <notmuch@notmuchmail.org>
\r
50 Subject: Re: [PATCH v2 2/4] test: emacs: new test "notmuch-search: replying to
\r
52 In-Reply-To: <1329683908-5435-3-git-send-email-pieter@praet.org>
\r
53 References: <1310313335-4159-1-git-send-email-pieter@praet.org>
\r
54 <1329683908-5435-1-git-send-email-pieter@praet.org>
\r
55 <1329683908-5435-3-git-send-email-pieter@praet.org>
\r
56 User-Agent: Notmuch/0.11.1+188~ga5674c2 (http://notmuchmail.org) Emacs/23.3.1
\r
57 (x86_64-pc-linux-gnu)
\r
58 Date: Mon, 20 Feb 2012 16:44:32 +0400
\r
59 Message-ID: <87fwe5lln3.fsf@gmail.com>
\r
61 Content-Type: text/plain; charset=us-ascii
\r
62 X-BeenThere: notmuch@notmuchmail.org
\r
63 X-Mailman-Version: 2.1.13
\r
65 List-Id: "Use and development of the notmuch mail system."
\r
66 <notmuch.notmuchmail.org>
\r
67 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
68 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
69 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
70 List-Post: <mailto:notmuch@notmuchmail.org>
\r
71 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
72 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
73 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
74 X-List-Received-Date: Mon, 20 Feb 2012 12:46:00 -0000
\r
76 On Sun, 19 Feb 2012 21:38:26 +0100, Pieter Praet <pieter@praet.org> wrote:
\r
77 > As pointed out in the previous commit, the test for replying from
\r
78 > within Emacs didn't actually submit the reply. This one does.
\r
80 > test/emacs | 41 +++++++++++++++++++++++++++++++++++++++++
\r
81 > 1 files changed, 41 insertions(+), 0 deletions(-)
\r
83 > diff --git a/test/emacs b/test/emacs
\r
84 > index 308d749..0f4f42b 100755
\r
87 > @@ -273,6 +273,47 @@ On 01 Jan 2000 12:00:00 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> w
\r
89 > test_expect_equal_file OUTPUT EXPECTED
\r
91 > +test_begin_subtest "notmuch-search: replying to a thread (sending)"
\r
92 > +$TEST_DIRECTORY/smtp-dummy sent_message &
\r
93 > +smtp_dummy_pid=$!
\r
95 > +'(let ((message-send-mail-function '\''message-smtpmail-send-it)
\r
96 > + (smtpmail-smtp-server "localhost")
\r
97 > + (smtpmail-smtp-service "25025"))
\r
98 > + (notmuch-search "subject:\"testing message sent via SMTP\"")
\r
99 > + (notmuch-test-wait)
\r
100 > + (notmuch-search-reply-to-thread)
\r
101 > + (end-of-buffer)
\r
103 > + (insert "Reply to a message via Emacs with fake SMTP")
\r
104 > + (message-send-and-exit))' >/dev/null 2>&1
\r
105 > +wait ${smtp_dummy_pid}
\r
106 > +notmuch new >/dev/null
\r
108 > + -e s',^User-Agent: Notmuch/.* Emacs/.*,User-Agent: Notmuch/XXX Emacs/XXX,' \
\r
109 > + -e s',^Message-ID: <.*>$,Message-ID: <XXX>,' \
\r
110 > + -e s',^In-Reply-To: <.*>$,In-Reply-To: <XXX>,' \
\r
111 > + -e s',^References: <.*>$,References: <XXX>,' \
\r
112 > + -e s',^Date: .*$,Date: Fri\, 29 Mar 1974 10:05:00 -0000,' < sent_message >OUTPUT
\r
114 This sed command is a (partial) copy past from "Sending a message via
\r
115 (fake) SMTP" test. I suggest adding notmuch_sent_message_sanitize
\r
116 function which would replace common headers with XXX.
\r
118 Replace Date with XXX for Date for consistency with other headers,
\r
119 AFAICT a valid date value is not needed here.
\r
124 > +cat <<EOF >EXPECTED
\r
125 > +From: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
126 > +To: user@example.com
\r
127 > +Subject: Re: Testing message sent via SMTP
\r
128 > +In-Reply-To: <XXX>
\r
129 > +References: <XXX>
\r
130 > +User-Agent: Notmuch/XXX Emacs/XXX
\r
131 > +Date: Fri, 29 Mar 1974 10:05:00 -0000
\r
132 > +Message-ID: <XXX>
\r
133 > +MIME-Version: 1.0
\r
134 > +Content-Type: text/plain; charset=us-ascii
\r
136 > +On 01 Jan 2000 12:00:00 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> wrote:
\r
137 > +> This is a test that messages are sent via SMTP
\r
139 > +Reply to a message via Emacs with fake SMTP
\r
141 > +test_expect_equal_file OUTPUT EXPECTED
\r
143 > test_begin_subtest "Quote MML tags in reply"
\r
144 > message_id='test-emacs-mml-quoting@message.id'
\r
145 > add_message [id]="$message_id" \
\r