Re: [PATCH v3] nmbug: Translate to Python
[notmuch-archives.git] / 1b / e18d92632a51b98dd5b6ace76534d22a65c7be
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 D52C4431FC7\r
6         for <notmuch@notmuchmail.org>; Sun, 19 Feb 2012 12:41:13 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.7\r
10 X-Spam-Level: \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 U4sKHtaHs+ZW for <notmuch@notmuchmail.org>;\r
16         Sun, 19 Feb 2012 12:41:11 -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  A036C431FC2    for <notmuch@notmuchmail.org>; Sun, 19 Feb 2012 12:41:11 -0800\r
21  (PST)\r
22 Received: by wgbdt11 with SMTP id dt11so2733452wgb.2\r
23         for <notmuch@notmuchmail.org>; Sun, 19 Feb 2012 12:41:10 -0800 (PST)\r
24 Received-SPF: pass (google.com: domain of pieter@praet.org designates\r
25         10.180.94.68 as permitted sender) client-ip=10.180.94.68; \r
26 Authentication-Results: mr.google.com;\r
27         spf=pass (google.com: domain of pieter@praet.org\r
28         designates 10.180.94.68 as permitted sender)\r
29         smtp.mail=pieter@praet.org\r
30 Received: from mr.google.com ([10.180.94.68])\r
31         by 10.180.94.68 with SMTP id da4mr11786172wib.22.1329684070357\r
32         (num_hops = 1); Sun, 19 Feb 2012 12:41:10 -0800 (PST)\r
33 MIME-Version: 1.0\r
34 Received: by 10.180.94.68 with SMTP id da4mr9873488wib.22.1329684070262;\r
35         Sun, 19 Feb 2012 12:41:10 -0800 (PST)\r
36 Received: from localhost (104.218-242-81.adsl-dyn.isp.belgacom.be.\r
37         [81.242.218.104])\r
38         by mx.google.com with ESMTPS id p10sm11687441wic.0.2012.02.19.12.41.09\r
39         (version=TLSv1/SSLv3 cipher=OTHER);\r
40         Sun, 19 Feb 2012 12:41:09 -0800 (PST)\r
41 From: Pieter Praet <pieter@praet.org>\r
42 To: Notmuch Mail <notmuch@notmuchmail.org>\r
43 Subject: [PATCH v2 2/4] test: emacs: new test "notmuch-search: replying to a\r
44         thread (sending)"\r
45 Date: Sun, 19 Feb 2012 21:38:26 +0100\r
46 Message-Id: <1329683908-5435-3-git-send-email-pieter@praet.org>\r
47 X-Mailer: git-send-email 1.7.8.1\r
48 In-Reply-To: <1329683908-5435-1-git-send-email-pieter@praet.org>\r
49 References: <1310313335-4159-1-git-send-email-pieter@praet.org>\r
50         <1329683908-5435-1-git-send-email-pieter@praet.org>\r
51 X-Gm-Message-State:\r
52  ALoCoQkLOAFLFJ1yjtjj6BqJp29GDsVUsVgjAW5eTSlJUsmXxdncnp1z8yDqyNcYsUbE6uglYz0n\r
53 X-BeenThere: notmuch@notmuchmail.org\r
54 X-Mailman-Version: 2.1.13\r
55 Precedence: list\r
56 List-Id: "Use and development of the notmuch mail system."\r
57         <notmuch.notmuchmail.org>\r
58 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
59         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
60 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
61 List-Post: <mailto:notmuch@notmuchmail.org>\r
62 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
63 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
64         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
65 X-List-Received-Date: Sun, 19 Feb 2012 20:41:14 -0000\r
66 \r
67 As pointed out in the previous commit, the test for replying from\r
68 within Emacs didn't actually submit the reply. This one does.\r
69 ---\r
70  test/emacs |   41 +++++++++++++++++++++++++++++++++++++++++\r
71  1 files changed, 41 insertions(+), 0 deletions(-)\r
72 \r
73 diff --git a/test/emacs b/test/emacs\r
74 index 308d749..0f4f42b 100755\r
75 --- a/test/emacs\r
76 +++ b/test/emacs\r
77 @@ -273,6 +273,47 @@ On 01 Jan 2000 12:00:00 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> w\r
78  EOF\r
79  test_expect_equal_file OUTPUT EXPECTED\r
80  \r
81 +test_begin_subtest "notmuch-search: replying to a thread (sending)"\r
82 +$TEST_DIRECTORY/smtp-dummy sent_message &\r
83 +smtp_dummy_pid=$!\r
84 +test_emacs \\r
85 +'(let ((message-send-mail-function '\''message-smtpmail-send-it)\r
86 +       (smtpmail-smtp-server "localhost")\r
87 +       (smtpmail-smtp-service "25025"))\r
88 +  (notmuch-search "subject:\"testing message sent via SMTP\"")\r
89 +  (notmuch-test-wait)\r
90 +  (notmuch-search-reply-to-thread)\r
91 +  (end-of-buffer)\r
92 +  (newline)\r
93 +  (insert "Reply to a message via Emacs with fake SMTP")\r
94 +  (message-send-and-exit))' >/dev/null 2>&1\r
95 +wait ${smtp_dummy_pid}\r
96 +notmuch new >/dev/null\r
97 +sed \\r
98 +    -e s',^User-Agent: Notmuch/.* Emacs/.*,User-Agent: Notmuch/XXX Emacs/XXX,' \\r
99 +    -e s',^Message-ID: <.*>$,Message-ID: <XXX>,' \\r
100 +    -e s',^In-Reply-To: <.*>$,In-Reply-To: <XXX>,' \\r
101 +    -e s',^References: <.*>$,References: <XXX>,' \\r
102 +    -e s',^Date: .*$,Date: Fri\, 29 Mar 1974 10:05:00 -0000,' < sent_message >OUTPUT\r
103 +cat <<EOF >EXPECTED\r
104 +From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
105 +To: user@example.com\r
106 +Subject: Re: Testing message sent via SMTP\r
107 +In-Reply-To: <XXX>\r
108 +References: <XXX>\r
109 +User-Agent: Notmuch/XXX Emacs/XXX\r
110 +Date: Fri, 29 Mar 1974 10:05:00 -0000\r
111 +Message-ID: <XXX>\r
112 +MIME-Version: 1.0\r
113 +Content-Type: text/plain; charset=us-ascii\r
114 +\r
115 +On 01 Jan 2000 12:00:00 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> wrote:\r
116 +> This is a test that messages are sent via SMTP\r
117 +\r
118 +Reply to a message via Emacs with fake SMTP\r
119 +EOF\r
120 +test_expect_equal_file OUTPUT EXPECTED\r
121 +\r
122  test_begin_subtest "Quote MML tags in reply"\r
123  message_id='test-emacs-mml-quoting@message.id'\r
124  add_message [id]="$message_id" \\r
125 -- \r
126 1.7.8.1\r
127 \r