Re: [ANNOUNCE] mutt with notmuch support
[notmuch-archives.git] / 6b / cc7bec478b4b7ffeb698afb81c937632505063
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 01A8A429E4A\r
6         for <notmuch@notmuchmail.org>; Mon, 27 Jun 2011 21:45:52 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.799\r
10 X-Spam-Level: \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 HjB72jxnMKYf for <notmuch@notmuchmail.org>;\r
17         Mon, 27 Jun 2011 21:45:50 -0700 (PDT)\r
18 Received: from mail-bw0-f53.google.com (mail-bw0-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 9B3CC421167\r
22         for <notmuch@notmuchmail.org>; Mon, 27 Jun 2011 21:45:43 -0700 (PDT)\r
23 Received: by mail-bw0-f53.google.com with SMTP id 12so4889638bwg.26\r
24         for <notmuch@notmuchmail.org>; Mon, 27 Jun 2011 21:45:43 -0700 (PDT)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
26         h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer\r
27         :in-reply-to:references;\r
28         bh=U6dv3iz9dDzB5rTWhH+TaYXiEjWXUD6wx7+GbykXkqA=;\r
29         b=UK9emUzGoUM+Lmt4wNIAf7SvF7b6n/M2h9ynKW9WSQmbA0aO3VCZoP4jSEvAEjc5JR\r
30         wmENDjUkV5TrYmHX//9qICRJYrUgSFSS+mhrPBMbG6n4JrRJzz9/4qri/9vqL/4NIXkd\r
31         jWgz2K9gFz5K5NGPH9ylaSuiJz/TsxhpzLGmI=\r
32 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;\r
33         h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
34         b=dOdMv+AH8G51bDwaeY3uVi1iQSOWY3o7vQS0K1q4nsLWTKiaCnhd8NFcgmAJ4xp1Wz\r
35         Rf/7bqE9tvOPwZUUKSEEQ1HYQamflueEIcFgmes8OX+Lm4wW5xlG97NTjMO4SA9aL1yQ\r
36         f/IWHcre6+t2dlP5/g5QGRn46EbMcWe75nxMI=\r
37 Received: by 10.204.32.207 with SMTP id e15mr5104137bkd.60.1309236343321;\r
38         Mon, 27 Jun 2011 21:45:43 -0700 (PDT)\r
39 Received: from localhost ([91.144.186.21])\r
40         by mx.google.com with ESMTPS id o3sm1547386bka.0.2011.06.27.21.45.42\r
41         (version=TLSv1/SSLv3 cipher=OTHER);\r
42         Mon, 27 Jun 2011 21:45:42 -0700 (PDT)\r
43 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
44 To: notmuch@notmuchmail.org\r
45 Subject: [PATCH 07/10] test: use emacs_deliver_message in Emacs SMTP send test\r
46 Date: Tue, 28 Jun 2011 08:45:08 +0400\r
47 Message-Id: <1309236311-2162-7-git-send-email-dmitry.kurochkin@gmail.com>\r
48 X-Mailer: git-send-email 1.7.5.4\r
49 In-Reply-To: <1309236311-2162-1-git-send-email-dmitry.kurochkin@gmail.com>\r
50 References: <1309236311-2162-1-git-send-email-dmitry.kurochkin@gmail.com>\r
51 X-BeenThere: notmuch@notmuchmail.org\r
52 X-Mailman-Version: 2.1.13\r
53 Precedence: list\r
54 List-Id: "Use and development of the notmuch mail system."\r
55         <notmuch.notmuchmail.org>\r
56 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
57         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
58 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
59 List-Post: <mailto:notmuch@notmuchmail.org>\r
60 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
61 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
62         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
63 X-List-Received-Date: Tue, 28 Jun 2011 04:45:52 -0000\r
64 \r
65 Minor changes to expected results of other Emacs tests were\r
66 needed because the message Date header changed.\r
67 ---\r
68  test/emacs |   34 +++++++++-------------------------\r
69  1 files changed, 9 insertions(+), 25 deletions(-)\r
70 \r
71 diff --git a/test/emacs b/test/emacs\r
72 index 4592005..409e033 100755\r
73 --- a/test/emacs\r
74 +++ b/test/emacs\r
75 @@ -118,28 +118,12 @@ output=$(notmuch search 'id:"123..456@example"' | notmuch_search_sanitize)\r
76  test_expect_equal "$output" "thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Message with .. in Message-Id (inbox search-add show-add)"\r
77  \r
78  test_begin_subtest "Sending a message via (fake) SMTP"\r
79 -\r
80 -# Before we can send a message, we have to prepare the FCC maildir\r
81 -mkdir -p mail/sent/cur\r
82 -mkdir -p mail/sent/new\r
83 -mkdir -p mail/sent/tmp\r
84 -\r
85 -../smtp-dummy sent_message &\r
86 -smtp_dummy_pid=$!\r
87 -test_emacs "(setq message-send-mail-function 'message-smtpmail-send-it)\r
88 -           (setq smtpmail-smtp-server \"localhost\")\r
89 -           (setq smtpmail-smtp-service \"25025\")\r
90 -           (notmuch-hello)\r
91 -           (notmuch-mua-mail)\r
92 -           (message-goto-to)\r
93 -           (insert \"user@example.com\nDate: Fri, 29 Mar 1974 10:00:00 -0000\")\r
94 -           (message-goto-subject)\r
95 -           (insert \"Testing message sent via SMTP\")\r
96 -           (message-goto-body)\r
97 -           (insert \"This is a test that messages are sent via SMTP\")\r
98 -           (message-send-and-exit)" >/dev/null 2>&1\r
99 -wait ${smtp_dummy_pid}\r
100 -\r
101 +emacs_deliver_message \\r
102 +    'Testing message sent via SMTP' \\r
103 +    'This is a test that messages are sent via SMTP' \\r
104 +    '(message-goto-to)\r
105 +     (kill-whole-line)\r
106 +     (insert "To: user@example.com\n")'\r
107  sed \\r
108      -e s',^User-Agent: Notmuch/.* Emacs/.*,User-Agent: Notmuch/XXX Emacs/XXX,' \\r
109      -e s',^Message-ID: <.*>$,Message-ID: <XXX>,' < sent_message >OUTPUT\r
110 @@ -147,7 +131,7 @@ cat <<EOF >EXPECTED\r
111  From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
112  To: user@example.com\r
113  Subject: Testing message sent via SMTP\r
114 -Date: Fri, 29 Mar 1974 10:00:00 -0000\r
115 +Date: 01 Jan 2000 12:00:00 -0000\r
116  User-Agent: Notmuch/XXX Emacs/XXX\r
117  Message-ID: <XXX>\r
118  MIME-Version: 1.0\r
119 @@ -160,7 +144,7 @@ test_expect_equal_file OUTPUT EXPECTED\r
120  test_begin_subtest "Verify that sent messages are saved/searchable (via FCC)"\r
121  notmuch new > /dev/null\r
122  output=$(notmuch search 'subject:"testing message sent via SMTP"' | notmuch_search_sanitize)\r
123 -test_expect_equal "$output" "thread:XXX   1974-03-29 [1/1] Notmuch Test Suite; Testing message sent via SMTP (inbox)"\r
124 +test_expect_equal "$output" "thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; Testing message sent via SMTP (inbox)"\r
125  \r
126  test_begin_subtest "notmuch-fcc-dirs set to nil"\r
127  test_emacs "(setq notmuch-fcc-dirs nil)\r
128 @@ -262,7 +246,7 @@ Subject: Re: Testing message sent via SMTP\r
129  In-Reply-To: <XXX>\r
130  Fcc: $(pwd)/mail/sent\r
131  --text follows this line--\r
132 -On Fri, 29 Mar 1974 10:00:00 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> wrote:\r
133 +On 01 Jan 2000 12:00:00 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> wrote:\r
134  > This is a test that messages are sent via SMTP\r
135  EOF\r
136  test_expect_equal_file OUTPUT EXPECTED\r
137 -- \r
138 1.7.5.4\r
139 \r