1 Return-Path: <awg@lagos.xvx.ca>
\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 01920421191
\r
6 for <notmuch@notmuchmail.org>; Sat, 31 Mar 2012 17:33:31 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_NONE=-0.0001] 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 40f5iqL-btYA for <notmuch@notmuchmail.org>;
\r
16 Sat, 31 Mar 2012 17:33:29 -0700 (PDT)
\r
17 Received: from idcmail-mo2no.shaw.ca (idcmail-mo2no.shaw.ca [64.59.134.9])
\r
18 by olra.theworths.org (Postfix) with ESMTP id B3142429E54
\r
19 for <notmuch@notmuchmail.org>; Sat, 31 Mar 2012 17:33:28 -0700 (PDT)
\r
20 Received: from lb7f8hsrpno-svcs.dcs.int.inet (HELO pd7ml2no-ssvc.prod.shaw.ca)
\r
22 by pd6mo1no-svcs.prod.shaw.ca with ESMTP; 31 Mar 2012 18:33:27 -0600
\r
23 X-Cloudmark-SP-Filtered: true
\r
24 X-Cloudmark-SP-Result: v=1.1 cv=GZn8e3lTBEeJrlGK3+GUWyR5aYe1SJcDn5uEERMe9yQ=
\r
26 a=_h02RqDfyKsA:10 a=BLceEmwcHowA:10 a=yQp6g8lIsgqumF79BAsFDg==:17
\r
27 a=7343-z1_AAAA:8 a=A1X0JdhQAAAA:8 a=V2sgnzSHAAAA:8 a=pGLkceISAAAA:8
\r
28 a=Ps0CLmBwa3s86Ge5-1UA:9 a=vH5s_6-iUSyMLwNrW-IA:7 a=0BPXsuqt4rsA:10
\r
29 a=0c-eHkXYtrgA:10 a=Y6qChIQXU1wA:10 a=Gb7Eya4fYr0A:10 a=MSl-tDqOz04A:10
\r
30 a=5WXwG0oxU3rw_xjX:21 a=yJUVya31QC1t70qB:21
\r
31 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117
\r
32 Received: from unknown (HELO lagos.xvx.ca) ([96.52.216.56])
\r
33 by pd7ml2no-dmz.prod.shaw.ca with ESMTP; 31 Mar 2012 18:33:27 -0600
\r
34 Received: by lagos.xvx.ca (Postfix, from userid 1000)
\r
35 id 2AE34800422D; Sat, 31 Mar 2012 18:33:27 -0600 (MDT)
\r
36 From: Adam Wolfe Gordon <awg+notmuch@xvx.ca>
\r
37 To: notmuch@notmuchmail.org
\r
38 Subject: [BUG/PATCH v3 3/4] test: Show all headers in emacs reply tests
\r
39 Date: Sat, 31 Mar 2012 18:33:23 -0600
\r
40 Message-Id: <1333240404-13076-4-git-send-email-awg+notmuch@xvx.ca>
\r
41 X-Mailer: git-send-email 1.7.5.4
\r
42 In-Reply-To: <1333240404-13076-1-git-send-email-awg+notmuch@xvx.ca>
\r
43 References: <1333240404-13076-1-git-send-email-awg+notmuch@xvx.ca>
\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: Sun, 01 Apr 2012 00:33:31 -0000
\r
58 By default, emacs hides the User-Agent and References headers when
\r
59 composing mail. This is a good thing for users, but a bad thing for
\r
60 testing, since we can create ugly or invalid headers and not have it
\r
61 show up in the tests.
\r
63 By setting message-hidden-headers to an empty list, we force emacs to
\r
64 show all the headers, so we can check that they're correct. Users
\r
65 won't see this, but it will let us catch future bugs.
\r
67 As a side-effect, this breaks all the reply tests, since there is a
\r
68 bug with the References and User-Agent headers, fixed in the next commit.
\r
70 test/emacs | 55 +++++++++++++++++++++++++++++++++++++++++++------------
\r
71 1 files changed, 43 insertions(+), 12 deletions(-)
\r
73 diff --git a/test/emacs b/test/emacs
\r
74 index 06291d3..7d00cae 100755
\r
77 @@ -256,17 +256,23 @@ EOF
\r
78 test_expect_equal_file OUTPUT EXPECTED
\r
80 test_begin_subtest "Reply within emacs"
\r
81 -test_emacs '(notmuch-search "subject:\"testing message sent via SMTP\"")
\r
82 +test_subtest_known_broken
\r
83 +test_emacs '(let ((message-hidden-headers ''()))
\r
84 + (notmuch-search "subject:\"testing message sent via SMTP\"")
\r
86 (notmuch-search-reply-to-thread)
\r
89 sed -i -e 's/^In-Reply-To: <.*>$/In-Reply-To: <XXX>/' OUTPUT
\r
90 +sed -i -e 's/^References: <.*>$/References: <XXX>/' OUTPUT
\r
91 +sed -i -e 's,^User-Agent: Notmuch/.* Emacs/.*,User-Agent: Notmuch/XXX Emacs/XXX,' OUTPUT
\r
93 From: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
94 To: user@example.com
\r
95 Subject: Re: Testing message sent via SMTP
\r
97 Fcc: ${MAIL_DIR}/sent
\r
99 +User-Agent: Notmuch/XXX Emacs/XXX
\r
100 --text follows this line--
\r
101 Notmuch Test Suite <test_suite@notmuchmail.org> writes:
\r
103 @@ -275,19 +281,24 @@ EOF
\r
104 test_expect_equal_file OUTPUT EXPECTED
\r
106 test_begin_subtest "Reply from alternate address within emacs"
\r
107 +test_subtest_known_broken
\r
108 add_message '[from]="Sender <sender@example.com>"' \
\r
109 [to]=test_suite_other@notmuchmail.org
\r
111 -test_emacs "(notmuch-search \"id:\\\"${gen_msg_id}\\\"\")
\r
112 +test_emacs "(let ((message-hidden-headers '()))
\r
113 + (notmuch-search \"id:\\\"${gen_msg_id}\\\"\")
\r
114 (notmuch-test-wait)
\r
115 (notmuch-search-reply-to-thread)
\r
118 +sed -i -e 's,^User-Agent: Notmuch/.* Emacs/.*,User-Agent: Notmuch/XXX Emacs/XXX,' OUTPUT
\r
119 cat <<EOF >EXPECTED
\r
120 From: Notmuch Test Suite <test_suite_other@notmuchmail.org>
\r
121 To: Sender <sender@example.com>
\r
122 Subject: Re: ${test_subtest_name}
\r
123 In-Reply-To: <${gen_msg_id}>
\r
124 Fcc: ${MAIL_DIR}/sent
\r
125 +References: <${gen_msg_id}>
\r
126 +User-Agent: Notmuch/XXX Emacs/XXX
\r
127 --text follows this line--
\r
128 Sender <sender@example.com> writes:
\r
130 @@ -296,20 +307,25 @@ EOF
\r
131 test_expect_equal_file OUTPUT EXPECTED
\r
133 test_begin_subtest "Reply from address in named group list within emacs"
\r
134 +test_subtest_known_broken
\r
135 add_message '[from]="Sender <sender@example.com>"' \
\r
136 '[to]=group:test_suite@notmuchmail.org,someone@example.com\;' \
\r
137 [cc]=test_suite_other@notmuchmail.org
\r
139 -test_emacs "(notmuch-search \"id:\\\"${gen_msg_id}\\\"\")
\r
140 +test_emacs "(let ((message-hidden-headers '()))
\r
141 + (notmuch-search \"id:\\\"${gen_msg_id}\\\"\")
\r
142 (notmuch-test-wait)
\r
143 (notmuch-search-reply-to-thread)
\r
146 +sed -i -e 's,^User-Agent: Notmuch/.* Emacs/.*,User-Agent: Notmuch/XXX Emacs/XXX,' OUTPUT
\r
147 cat <<EOF >EXPECTED
\r
148 From: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
149 To: Sender <sender@example.com>, someone@example.com
\r
150 Subject: Re: ${test_subtest_name}
\r
151 In-Reply-To: <${gen_msg_id}>
\r
152 Fcc: ${MAIL_DIR}/sent
\r
153 +References: <${gen_msg_id}>
\r
154 +User-Agent: Notmuch/XXX Emacs/XXX
\r
155 --text follows this line--
\r
156 Sender <sender@example.com> writes:
\r
158 @@ -318,15 +334,20 @@ EOF
\r
159 test_expect_equal_file OUTPUT EXPECTED
\r
161 test_begin_subtest "Reply within emacs to a multipart/mixed message"
\r
162 -test_emacs '(notmuch-show "id:20091118002059.067214ed@hikari")
\r
163 +test_subtest_known_broken
\r
164 +test_emacs '(let ((message-hidden-headers ''()))
\r
165 + (notmuch-show "id:20091118002059.067214ed@hikari")
\r
166 (notmuch-show-reply)
\r
169 +sed -i -e 's,^User-Agent: Notmuch/.* Emacs/.*,User-Agent: Notmuch/XXX Emacs/XXX,' OUTPUT
\r
170 cat <<EOF >EXPECTED
\r
171 From: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
172 To: Adrian Perez de Castro <aperez@igalia.com>, notmuch@notmuchmail.org
\r
173 Subject: Re: [notmuch] Introducing myself
\r
174 In-Reply-To: <20091118002059.067214ed@hikari>
\r
175 Fcc: ${MAIL_DIR}/sent
\r
176 +References: <20091118002059.067214ed@hikari>
\r
177 +User-Agent: Notmuch/XXX Emacs/XXX
\r
178 --text follows this line--
\r
179 Adrian Perez de Castro <aperez@igalia.com> writes:
\r
181 @@ -377,15 +398,20 @@ EOF
\r
182 test_expect_equal_file OUTPUT EXPECTED
\r
184 test_begin_subtest "Reply within emacs to a multipart/alternative message"
\r
185 -test_emacs '(notmuch-show "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com")
\r
186 +test_subtest_known_broken
\r
187 +test_emacs '(let ((message-hidden-headers ''()))
\r
188 + (notmuch-show "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com")
\r
189 (notmuch-show-reply)
\r
192 +sed -i -e 's,^User-Agent: Notmuch/.* Emacs/.*,User-Agent: Notmuch/XXX Emacs/XXX,' OUTPUT
\r
193 cat <<EOF >EXPECTED
\r
194 From: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
195 To: Alex Botero-Lowry <alex.boterolowry@gmail.com>, notmuch@notmuchmail.org
\r
196 Subject: Re: [notmuch] preliminary FreeBSD support
\r
197 In-Reply-To: <cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com>
\r
198 Fcc: ${MAIL_DIR}/sent
\r
199 +References: <cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com>
\r
200 +User-Agent: Notmuch/XXX Emacs/XXX
\r
201 --text follows this line--
\r
202 Alex Botero-Lowry <alex.boterolowry@gmail.com> writes:
\r
204 @@ -413,19 +439,24 @@ EOF
\r
205 test_expect_equal_file OUTPUT EXPECTED
\r
207 test_begin_subtest "Quote MML tags in reply"
\r
208 +test_subtest_known_broken
\r
209 message_id='test-emacs-mml-quoting@message.id'
\r
210 add_message [id]="$message_id" \
\r
211 "[subject]='$test_subtest_name'" \
\r
212 '[body]="<#part disposition=inline>"'
\r
213 -test_emacs "(notmuch-show \"id:$message_id\")
\r
214 +test_emacs "(let ((message-hidden-headers '()))
\r
215 + (notmuch-show \"id:$message_id\")
\r
216 (notmuch-show-reply)
\r
219 +sed -i -e 's,^User-Agent: Notmuch/.* Emacs/.*,User-Agent: Notmuch/XXX Emacs/XXX,' OUTPUT
\r
220 cat <<EOF >EXPECTED
\r
221 From: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
223 Subject: Re: Quote MML tags in reply
\r
224 In-Reply-To: <test-emacs-mml-quoting@message.id>
\r
225 Fcc: ${MAIL_DIR}/sent
\r
226 +References: <test-emacs-mml-quoting@message.id>
\r
227 +User-Agent: Notmuch/XXX Emacs/XXX
\r
228 --text follows this line--
\r
229 Notmuch Test Suite <test_suite@notmuchmail.org> writes:
\r