1 Return-Path: <jrollins@finestructure.net>
\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 CDBE5431FC4
\r
6 for <notmuch@notmuchmail.org>; Sun, 12 Aug 2012 10:39:50 -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 tests=[none]
\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 p4gO8qBhQKiv for <notmuch@notmuchmail.org>;
\r
16 Sun, 12 Aug 2012 10:39:39 -0700 (PDT)
\r
17 Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu
\r
19 by olra.theworths.org (Postfix) with ESMTP id 7A44D431FBD
\r
20 for <notmuch@notmuchmail.org>; Sun, 12 Aug 2012 10:39:37 -0700 (PDT)
\r
21 Received: from earth-doxen.imss.caltech.edu (localhost [127.0.0.1])
\r
22 by earth-doxen-postvirus (Postfix) with ESMTP id 42A6766E0011
\r
23 for <notmuch@notmuchmail.org>; Sun, 12 Aug 2012 10:39:35 -0700 (PDT)
\r
24 X-Spam-Scanned: at Caltech-IMSS on earth-doxen by amavisd-new
\r
25 Received: from finestructure.net (unknown [76.89.192.57])
\r
26 (Authenticated sender: jrollins)
\r
27 by earth-doxen-submit (Postfix) with ESMTP id 35A9866E00AD
\r
28 for <notmuch@notmuchmail.org>; Sun, 12 Aug 2012 10:39:30 -0700 (PDT)
\r
29 Received: by finestructure.net (Postfix, from userid 1000)
\r
30 id CA276244; Sun, 12 Aug 2012 10:39:28 -0700 (PDT)
\r
31 From: Jameson Graef Rollins <jrollins@finestructure.net>
\r
32 To: Notmuch Mail <notmuch@notmuchmail.org>
\r
33 Subject: [PATCH 2/2] test: move all emacs show tests to emacs-show test script
\r
34 Date: Sun, 12 Aug 2012 10:39:28 -0700
\r
35 Message-Id: <1344793168-23555-2-git-send-email-jrollins@finestructure.net>
\r
36 X-Mailer: git-send-email 1.7.10.4
\r
37 In-Reply-To: <1344793168-23555-1-git-send-email-jrollins@finestructure.net>
\r
38 References: <87r4rf9q8x.fsf@qmul.ac.uk>
\r
39 <1344793168-23555-1-git-send-email-jrollins@finestructure.net>
\r
40 X-BeenThere: notmuch@notmuchmail.org
\r
41 X-Mailman-Version: 2.1.13
\r
43 List-Id: "Use and development of the notmuch mail system."
\r
44 <notmuch.notmuchmail.org>
\r
45 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
46 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
47 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
48 List-Post: <mailto:notmuch@notmuchmail.org>
\r
49 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
50 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
51 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
52 X-List-Received-Date: Sun, 12 Aug 2012 17:39:51 -0000
\r
54 No functional change.
\r
56 Most notmuch-show mode tests were in the emacs script, while some were
\r
57 in the emacs-show script. This moves all the notmuch-show mode tests
\r
58 to the emacs-show script, to make things a little more consistent.
\r
60 This patch is not necessary, but I think it makes the emacs tests
\r
61 clearer, by not having tests for show-mode split across multiple test
\r
64 test/emacs | 397 +----------------------------------------------------
\r
65 test/emacs-show | 409 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
\r
66 2 files changed, 410 insertions(+), 396 deletions(-)
\r
68 diff --git a/test/emacs b/test/emacs
\r
69 index afe35ba..9cb5795 100755
\r
72 @@ -54,49 +54,6 @@ test_emacs '(notmuch-hello)
\r
74 test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-view-inbox
\r
76 -test_begin_subtest "Basic notmuch-show view in emacs"
\r
77 -maildir_storage_thread=$(notmuch search --output=threads id:20091117190054.GU3165@dottiness.seas.harvard.edu)
\r
78 -test_emacs "(notmuch-show \"$maildir_storage_thread\")
\r
80 -test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-maildir-storage
\r
82 -test_begin_subtest "Basic notmuch-show view in emacs default indentation"
\r
83 -maildir_storage_thread=$(notmuch search --output=threads id:20091117190054.GU3165@dottiness.seas.harvard.edu)
\r
84 -test_emacs "(let ((notmuch-show-indent-messages-width 1))
\r
85 - (notmuch-show \"$maildir_storage_thread\")
\r
87 -test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-maildir-storage
\r
89 -test_begin_subtest "Basic notmuch-show view in emacs without indentation"
\r
90 -maildir_storage_thread=$(notmuch search --output=threads id:20091117190054.GU3165@dottiness.seas.harvard.edu)
\r
91 -test_emacs "(let ((notmuch-show-indent-messages-width 0))
\r
92 - (notmuch-show \"$maildir_storage_thread\")
\r
94 -test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-maildir-storage-without-indentation
\r
96 -test_begin_subtest "Basic notmuch-show view in emacs with fourfold indentation"
\r
97 -maildir_storage_thread=$(notmuch search --output=threads id:20091117190054.GU3165@dottiness.seas.harvard.edu)
\r
98 -test_emacs "(let ((notmuch-show-indent-messages-width 4))
\r
99 - (notmuch-show \"$maildir_storage_thread\")
\r
101 -test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-maildir-storage-with-fourfold-indentation
\r
103 -test_begin_subtest "notmuch-show for message with invalid From"
\r
104 -add_message "[subject]=\"message-with-invalid-from\"" \
\r
105 - "[from]=\"\\\"Invalid \\\" From\\\" <test_suite@notmuchmail.org>\""
\r
106 -thread=$(notmuch search --output=threads subject:message-with-invalid-from)
\r
107 -test_emacs "(notmuch-show \"$thread\")
\r
109 -cat <<EOF >EXPECTED
\r
110 -"Invalid " (2001-01-05) (inbox)
\r
111 -Subject: message-with-invalid-from
\r
112 -To: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
113 -Date: Fri, 05 Jan 2001 15:43:57 +0000
\r
115 -This is just a test message (#1)
\r
117 -test_expect_equal_file OUTPUT EXPECTED
\r
119 test_begin_subtest "Navigation of notmuch-search to thread view"
\r
120 test_emacs '(notmuch-search "tag:inbox")
\r
121 (notmuch-test-wait)
\r
122 @@ -122,18 +79,6 @@ test_emacs "(notmuch-search \"$os_x_darwin_thread\")
\r
123 output=$(notmuch search $os_x_darwin_thread | notmuch_search_sanitize)
\r
124 test_expect_equal "$output" "thread:XXX 2009-11-18 [4/4] Jjgod Jiang, Alexander Botero-Lowry; [notmuch] Mac OS X/Darwin compatibility issues (inbox unread)"
\r
126 -test_begin_subtest "Add tag from notmuch-show view"
\r
127 -test_emacs "(notmuch-show \"$os_x_darwin_thread\")
\r
128 - (execute-kbd-macro \"+tag-from-show-view\")"
\r
129 -output=$(notmuch search $os_x_darwin_thread | notmuch_search_sanitize)
\r
130 -test_expect_equal "$output" "thread:XXX 2009-11-18 [4/4] Jjgod Jiang, Alexander Botero-Lowry; [notmuch] Mac OS X/Darwin compatibility issues (inbox tag-from-show-view unread)"
\r
132 -test_begin_subtest "Remove tag from notmuch-show view"
\r
133 -test_emacs "(notmuch-show \"$os_x_darwin_thread\")
\r
134 - (execute-kbd-macro \"-tag-from-show-view\")"
\r
135 -output=$(notmuch search $os_x_darwin_thread | notmuch_search_sanitize)
\r
136 -test_expect_equal "$output" "thread:XXX 2009-11-18 [4/4] Jjgod Jiang, Alexander Botero-Lowry; [notmuch] Mac OS X/Darwin compatibility issues (inbox unread)"
\r
138 test_begin_subtest "Message with .. in Message-Id:"
\r
139 add_message [id]=123..456@example '[subject]="Message with .. in Message-Id"'
\r
140 test_emacs '(notmuch-search "id:\"123..456@example\"")
\r
141 @@ -351,248 +296,7 @@ Sender <sender@example.com> writes:
\r
143 test_expect_equal_file OUTPUT EXPECTED
\r
145 -test_begin_subtest "Reply within emacs to a multipart/mixed message"
\r
146 -test_emacs '(let ((message-hidden-headers ''()))
\r
147 - (notmuch-show "id:20091118002059.067214ed@hikari")
\r
148 - (notmuch-show-reply)
\r
150 -sed -i -e 's,^User-Agent: Notmuch/.* Emacs/.*,User-Agent: Notmuch/XXX Emacs/XXX,' OUTPUT
\r
151 -cat <<EOF >EXPECTED
\r
152 -From: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
153 -To: Adrian Perez de Castro <aperez@igalia.com>, notmuch@notmuchmail.org
\r
154 -Subject: Re: [notmuch] Introducing myself
\r
155 -In-Reply-To: <20091118002059.067214ed@hikari>
\r
156 -Fcc: ${MAIL_DIR}/sent
\r
157 -References: <20091118002059.067214ed@hikari>
\r
158 -User-Agent: Notmuch/XXX Emacs/XXX
\r
159 ---text follows this line--
\r
160 -Adrian Perez de Castro <aperez@igalia.com> writes:
\r
164 -> I have just heard about Not Much today in some random Linux-related news
\r
165 -> site (LWN?), my name is Adrian Perez and I work as systems administrator
\r
166 -> (although I can do some code as well :P). I have always thought that the
\r
167 -> ideas behind Sup were great, but after some time using it, I got tired of
\r
168 -> the oddities that it has. I also do not like doing things like having to
\r
169 -> install Ruby just for reading and sorting mails. Some time ago I thought
\r
170 -> about doing something like Not Much and in fact I played a bit with the
\r
171 -> Python+Xapian and the Python+Whoosh combinations, because I find relaxing
\r
172 -> to code things in Python when I am not working and also it is installed
\r
173 -> by default on most distribution. I got to have some mailboxes indexed and
\r
174 -> basic searching working a couple of months ago. Lately I have been very
\r
175 -> busy and had no time for coding, and them... boom! Not Much appears -- and
\r
176 -> it is almost exactly what I was trying to do, but faster. I have been
\r
177 -> playing a bit with Not Much today, and I think it has potential.
\r
179 -> Also, I would like to share one idea I had in mind, that you might find
\r
180 -> interesting: One thing I have found very annoying is having to re-tag my
\r
181 -> mail when the indexes get b0rked (it happened a couple of times to me while
\r
182 -> using Sup), so I was planning to mails as read/unread and adding the tags
\r
183 -> not just to the index, but to the mail text itself, e.g. by adding a
\r
184 -> "X-Tags" header field or by reusing the "Keywords" one. This way, the index
\r
185 -> could be totally recreated by re-reading the mail directories, and this
\r
186 -> would also allow to a tools like OfflineIMAP [1] to get the mails into a
\r
187 -> local maildir, tagging and indexing the mails with the e-mail reader and
\r
188 -> then syncing back the messages with the "X-Tags" header to the IMAP server.
\r
189 -> This would allow to use the mail reader from a different computer and still
\r
190 -> have everything tagged finely.
\r
196 -> [1] http://software.complete.org/software/projects/show/offlineimap
\r
199 -> Adrian Perez de Castro <aperez@igalia.com>
\r
200 -> Igalia - Free Software Engineering
\r
201 -> _______________________________________________
\r
202 -> notmuch mailing list
\r
203 -> notmuch@notmuchmail.org
\r
204 -> http://notmuchmail.org/mailman/listinfo/notmuch
\r
206 -test_expect_equal_file OUTPUT EXPECTED
\r
208 -test_begin_subtest "Reply within emacs to a multipart/alternative message"
\r
209 -test_emacs '(let ((message-hidden-headers ''()))
\r
210 - (notmuch-show "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com")
\r
211 - (notmuch-show-reply)
\r
213 -sed -i -e 's,^User-Agent: Notmuch/.* Emacs/.*,User-Agent: Notmuch/XXX Emacs/XXX,' OUTPUT
\r
214 -cat <<EOF >EXPECTED
\r
215 -From: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
216 -To: Alex Botero-Lowry <alex.boterolowry@gmail.com>, notmuch@notmuchmail.org
\r
217 -Subject: Re: [notmuch] preliminary FreeBSD support
\r
218 -In-Reply-To: <cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com>
\r
219 -Fcc: ${MAIL_DIR}/sent
\r
220 -References: <cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com>
\r
221 -User-Agent: Notmuch/XXX Emacs/XXX
\r
222 ---text follows this line--
\r
223 -Alex Botero-Lowry <alex.boterolowry@gmail.com> writes:
\r
225 -> I saw the announcement this morning, and was very excited, as I had been
\r
226 -> hoping sup would be turned into a library,
\r
227 -> since I like the concept more than the UI (I'd rather an emacs interface).
\r
229 -> I did a preliminary compile which worked out fine, but
\r
230 -> sysconf(_SC_SC_GETPW_R_SIZE_MAX) returns -1 on
\r
231 -> FreeBSD, so notmuch_config_open segfaulted.
\r
233 -> Attached is a patch that supplies a default buffer size of 64 in cases where
\r
236 -> http://www.opengroup.org/austin/docs/austin_328.txt - seems to indicate this
\r
237 -> is acceptable behavior,
\r
238 -> and http://mail-index.netbsd.org/pkgsrc-bugs/2006/06/07/msg016808.htmlspecifically
\r
241 -> _______________________________________________
\r
242 -> notmuch mailing list
\r
243 -> notmuch@notmuchmail.org
\r
244 -> http://notmuchmail.org/mailman/listinfo/notmuch
\r
246 -test_expect_equal_file OUTPUT EXPECTED
\r
248 -test_begin_subtest "Reply within emacs to an html-only message"
\r
249 -add_message '[content-type]="text/html"' \
\r
250 - '[body]="Hi,<br />This is an <b>HTML</b> test message.<br /><br />OK?"'
\r
251 -test_emacs "(let ((message-hidden-headers '()) (mm-text-html-renderer 'html2text))
\r
252 - (notmuch-show \"id:${gen_msg_id}\")
\r
253 - (notmuch-show-reply)
\r
255 -sed -i -e 's,^User-Agent: Notmuch/.* Emacs/.*,User-Agent: Notmuch/XXX Emacs/XXX,' OUTPUT
\r
256 -cat <<EOF >EXPECTED
\r
257 -From: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
259 -Subject: Re: Reply within emacs to an html-only message
\r
260 -In-Reply-To: <${gen_msg_id}>
\r
261 -Fcc: ${MAIL_DIR}/sent
\r
262 -References: <${gen_msg_id}>
\r
263 -User-Agent: Notmuch/XXX Emacs/XXX
\r
264 ---text follows this line--
\r
265 -Notmuch Test Suite <test_suite@notmuchmail.org> writes:
\r
267 -> Hi,This is an HTML test message.OK?
\r
269 -test_expect_equal_file OUTPUT EXPECTED
\r
271 -test_begin_subtest "Quote MML tags in reply"
\r
272 -message_id='test-emacs-mml-quoting@message.id'
\r
273 -add_message [id]="$message_id" \
\r
274 - "[subject]='$test_subtest_name'" \
\r
275 - '[body]="<#part disposition=inline>"'
\r
276 -test_emacs "(let ((message-hidden-headers '()))
\r
277 - (notmuch-show \"id:$message_id\")
\r
278 - (notmuch-show-reply)
\r
280 -sed -i -e 's,^User-Agent: Notmuch/.* Emacs/.*,User-Agent: Notmuch/XXX Emacs/XXX,' OUTPUT
\r
281 -cat <<EOF >EXPECTED
\r
282 -From: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
284 -Subject: Re: Quote MML tags in reply
\r
285 -In-Reply-To: <test-emacs-mml-quoting@message.id>
\r
286 -Fcc: ${MAIL_DIR}/sent
\r
287 -References: <test-emacs-mml-quoting@message.id>
\r
288 -User-Agent: Notmuch/XXX Emacs/XXX
\r
289 ---text follows this line--
\r
290 -Notmuch Test Suite <test_suite@notmuchmail.org> writes:
\r
292 -> <#!part disposition=inline>
\r
294 -test_expect_equal_file OUTPUT EXPECTED
\r
296 -test_begin_subtest "Save attachment from within emacs using notmuch-show-save-attachments"
\r
297 -# save as archive to test that Emacs does not re-compress .gz
\r
298 -test_emacs '(let ((standard-input "\"attachment1.gz\""))
\r
299 - (notmuch-show "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com")
\r
300 - (notmuch-show-save-attachments))'
\r
301 -test_expect_equal_file attachment1.gz "$EXPECTED/attachment"
\r
303 -test_begin_subtest "Save attachment from within emacs using notmuch-show-save-part"
\r
304 -# save as archive to test that Emacs does not re-compress .gz
\r
305 -test_emacs '(let ((standard-input "\"attachment2.gz\""))
\r
306 - (notmuch-show-save-part "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com" 5))'
\r
307 -test_expect_equal_file attachment2.gz "$EXPECTED/attachment"
\r
309 -test_begin_subtest "View raw message within emacs"
\r
310 -test_emacs '(notmuch-show "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com")
\r
311 - (notmuch-show-view-raw-message)
\r
313 -test_expect_equal_file OUTPUT $EXPECTED/raw-message-cf0c4d-52ad0a
\r
315 -test_begin_subtest "Hiding/showing signature in notmuch-show view"
\r
316 -maildir_storage_thread=$(notmuch search --output=threads id:20091117190054.GU3165@dottiness.seas.harvard.edu)
\r
317 -test_emacs "(notmuch-show \"$maildir_storage_thread\")
\r
318 - (search-forward \"Click/Enter to show.\")
\r
319 - (button-activate (button-at (point)))
\r
320 - (search-backward \"Click/Enter to hide.\")
\r
321 - (button-activate (button-at (point)))
\r
323 -test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-maildir-storage
\r
325 -test_begin_subtest "Detection and hiding of top-post quoting of message"
\r
326 -add_message '[subject]="The problem with top-posting"' \
\r
327 - [id]=top-post-target \
\r
328 - '[body]="A: Because it messes up the order in which people normally read text.
\r
329 -Q: Why is top-posting such a bad thing?
\r
331 -Q: What is the most annoying thing in e-mail?"'
\r
332 -add_message '[from]="Top Poster <top@poster.com>"' \
\r
333 - [in-reply-to]=top-post-target \
\r
334 - [references]=top-post-target \
\r
335 - '[subject]="Re: The problem with top-posting"' \
\r
336 - '[body]="Thanks for the advice! I will be sure to put it to good use.
\r
340 ------ Original Message -----
\r
341 -From: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
342 -To: Notmuch Test Suite <test_suite@notmuchmai.org>
\r
343 -Sent: Fri, 05 Jan 2001 15:43:57 +0000
\r
344 -Subject: The problem with top-posting
\r
346 -Q: Why is top-posting such a bad thing?
\r
348 -Q: What is the most annoying thing in e-mail?"'
\r
349 -test_emacs "(notmuch-show \"top-posting\")
\r
350 - (test-visible-output)"
\r
351 -echo "Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-05) (inbox)
\r
352 -Subject: The problem with top-posting
\r
353 -To: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
354 -Date: Fri, 05 Jan 2001 15:43:57 +0000
\r
356 -A: Because it messes up the order in which people normally read text.
\r
357 -Q: Why is top-posting such a bad thing?
\r
359 -Q: What is the most annoying thing in e-mail?
\r
360 -Top Poster <top@poster.com> (2001-01-05) (inbox unread)
\r
361 -Subject: Re: The problem with top-posting
\r
362 -To: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
363 -Date: Fri, 05 Jan 2001 15:43:57 +0000
\r
365 -Thanks for the advice! I will be sure to put it to good use.
\r
369 -[ 9-line hidden original message. Click/Enter to show. ]" > EXPECTED
\r
370 -test_expect_equal_file OUTPUT EXPECTED
\r
372 -test_begin_subtest "Hiding message in notmuch-show view"
\r
373 -test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.gmail.com")
\r
374 - (notmuch-show-toggle-message)
\r
375 - (test-visible-output)'
\r
376 -test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-with-hidden-messages
\r
378 -test_begin_subtest "Hiding message with visible citation in notmuch-show view"
\r
379 -test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.gmail.com")
\r
380 - (search-forward "Click/Enter to show.")
\r
381 - (button-activate (button-at (point)))
\r
382 - (notmuch-show-toggle-message)
\r
383 - (test-visible-output)'
\r
384 -test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-with-hidden-messages
\r
386 -test_begin_subtest "Stashing in notmuch-show"
\r
387 +test_begin_subtest "Stashing in notmuch-search"
\r
388 add_message '[date]="Sat, 01 Jan 2000 12:00:00 -0000"' \
\r
389 '[from]="Some One <someone@somewhere.org>"' \
\r
390 '[to]="Some One Else <notsomeone@somewhere.org>"' \
\r
391 @@ -601,44 +305,6 @@ add_message '[date]="Sat, 01 Jan 2000 12:00:00 -0000"' \
\r
393 '[body]="Unable to stash body. Where did you get it in the first place?!?"'
\r
394 notmuch tag +stashtest id:${gen_msg_id}
\r
395 -test_emacs '(notmuch-show "id:\"bought\"")
\r
396 - (notmuch-show-stash-date)
\r
397 - (notmuch-show-stash-from)
\r
398 - (notmuch-show-stash-to)
\r
399 - (notmuch-show-stash-cc)
\r
400 - (notmuch-show-stash-subject)
\r
401 - (notmuch-show-stash-message-id)
\r
402 - (notmuch-show-stash-message-id-stripped)
\r
403 - (notmuch-show-stash-tags)
\r
404 - (notmuch-show-stash-filename)
\r
405 - (notmuch-show-stash-mlarchive-link "Gmane")
\r
406 - (notmuch-show-stash-mlarchive-link "MARC")
\r
407 - (notmuch-show-stash-mlarchive-link "Mail Archive, The")
\r
408 - (switch-to-buffer
\r
409 - (generate-new-buffer "*test-stashing*"))
\r
413 - (rotate-yank-pointer 1))
\r
414 - (reverse-region (point-min) (point-max))
\r
416 -cat <<EOF >EXPECTED
\r
417 -Sat, 01 Jan 2000 12:00:00 +0000
\r
418 -Some One <someone@somewhere.org>
\r
419 -Some One Else <notsomeone@somewhere.org>
\r
420 -Notmuch <notmuch@notmuchmail.org>
\r
421 -Stash my stashables
\r
425 -${gen_msg_filename}
\r
426 -http://mid.gmane.org/bought
\r
427 -http://marc.info/?i=bought
\r
428 -http://mail-archive.com/search?l=mid&q=bought
\r
430 -test_expect_equal_file OUTPUT EXPECTED
\r
432 -test_begin_subtest "Stashing in notmuch-search"
\r
433 test_emacs '(notmuch-search "id:\"bought\"")
\r
434 (notmuch-test-wait)
\r
435 (notmuch-search-stash-thread-id)
\r
436 @@ -649,67 +315,6 @@ test_emacs '(notmuch-search "id:\"bought\"")
\r
437 sed -i -e 's/^thread:.*$/thread:XXX/' OUTPUT
\r
438 test_expect_equal "$(cat OUTPUT)" "thread:XXX"
\r
440 -test_begin_subtest 'notmuch-show-advance-and-archive with invisible signature'
\r
441 -message1='id:20091118010116.GC25380@dottiness.seas.harvard.edu'
\r
442 -message2='id:1258491078-29658-1-git-send-email-dottedmag@dottedmag.net'
\r
443 -test_emacs "(notmuch-search \"$message1 or $message2\")
\r
444 - (notmuch-test-wait)
\r
445 - (notmuch-search-show-thread)
\r
446 - (goto-char (point-max))
\r
448 - (notmuch-show-advance-and-archive)
\r
450 -test_emacs "(notmuch-show \"$message2\")
\r
451 - (test-output \"EXPECTED\")"
\r
452 -test_expect_equal_file OUTPUT EXPECTED
\r
454 -test_begin_subtest "Refresh show buffer"
\r
455 -test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.gmail.com")
\r
456 - (test-visible-output "EXPECTED")
\r
457 - (notmuch-show-refresh-view)
\r
458 - (test-visible-output)'
\r
459 -test_expect_equal_file OUTPUT EXPECTED
\r
461 -test_begin_subtest "Refresh modified show buffer"
\r
462 -test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.gmail.com")
\r
463 - (notmuch-show-toggle-message)
\r
464 - (notmuch-show-next-message)
\r
465 - (notmuch-show-toggle-message)
\r
466 - (test-visible-output "EXPECTED")
\r
467 - (notmuch-show-refresh-view)
\r
468 - (test-visible-output)'
\r
469 -test_expect_equal_file OUTPUT EXPECTED
\r
471 -test_begin_subtest "Do not call notmuch for non-inlinable application/mpeg parts"
\r
472 -id='message-with-application/mpeg-attachment@notmuchmail.org'
\r
473 -emacs_deliver_message \
\r
474 - 'Message with application/mpeg attachment' \
\r
476 - "(message-goto-eoh)
\r
477 - (insert \"Message-ID: <$id>\n\")
\r
478 - (message-goto-body)
\r
479 - (mml-insert-part \"application/mpeg\")
\r
480 - (insert \"a fake mp3 file\")"
\r
481 -notmuch_counter_reset
\r
482 -test_emacs "(let ((notmuch-command \"$notmuch_counter_command\"))
\r
483 - (notmuch-show \"id:$id\"))"
\r
484 -test_expect_equal $(notmuch_counter_value) 1
\r
486 -test_begin_subtest "Do not call notmuch for non-inlinable audio/mpeg parts"
\r
487 -id='message-with-audio/mpeg-attachment@notmuchmail.org'
\r
488 -emacs_deliver_message \
\r
489 - 'Message with audio/mpeg attachment' \
\r
491 - "(message-goto-eoh)
\r
492 - (insert \"Message-ID: <$id>\n\")
\r
493 - (message-goto-body)
\r
494 - (mml-insert-part \"audio/mpeg\")
\r
495 - (insert \"a fake mp3 file\")"
\r
496 -notmuch_counter_reset
\r
497 -test_emacs "(let ((notmuch-command \"$notmuch_counter_command\"))
\r
498 - (notmuch-show \"id:$id\"))"
\r
499 -test_expect_equal $(notmuch_counter_value) 1
\r
501 test_begin_subtest "notmuch-hello-mode hook is called"
\r
502 counter=$(test_emacs \
\r
503 '(let ((notmuch-hello-mode-hook-counter 0))
\r
504 diff --git a/test/emacs-show b/test/emacs-show
\r
505 index 695f929..923a808 100755
\r
506 --- a/test/emacs-show
\r
507 +++ b/test/emacs-show
\r
509 test_description="emacs notmuch-show view"
\r
512 +EXPECTED=$TEST_DIRECTORY/emacs.expected-output
\r
516 +test_begin_subtest "Basic notmuch-show view"
\r
517 +maildir_storage_thread=$(notmuch search --output=threads id:20091117190054.GU3165@dottiness.seas.harvard.edu)
\r
518 +test_emacs "(notmuch-show \"$maildir_storage_thread\")
\r
520 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-maildir-storage
\r
522 +test_begin_subtest "Basic notmuch-show view default indentation"
\r
523 +maildir_storage_thread=$(notmuch search --output=threads id:20091117190054.GU3165@dottiness.seas.harvard.edu)
\r
524 +test_emacs "(let ((notmuch-show-indent-messages-width 1))
\r
525 + (notmuch-show \"$maildir_storage_thread\")
\r
527 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-maildir-storage
\r
529 +test_begin_subtest "Basic notmuch-show view without indentation"
\r
530 +maildir_storage_thread=$(notmuch search --output=threads id:20091117190054.GU3165@dottiness.seas.harvard.edu)
\r
531 +test_emacs "(let ((notmuch-show-indent-messages-width 0))
\r
532 + (notmuch-show \"$maildir_storage_thread\")
\r
534 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-maildir-storage-without-indentation
\r
536 +test_begin_subtest "Basic notmuch-show view with fourfold indentation"
\r
537 +maildir_storage_thread=$(notmuch search --output=threads id:20091117190054.GU3165@dottiness.seas.harvard.edu)
\r
538 +test_emacs "(let ((notmuch-show-indent-messages-width 4))
\r
539 + (notmuch-show \"$maildir_storage_thread\")
\r
541 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-maildir-storage-with-fourfold-indentation
\r
543 +test_begin_subtest "Message with invalid From"
\r
544 +add_message "[subject]=\"message-with-invalid-from\"" \
\r
545 + "[from]=\"\\\"Invalid \\\" From\\\" <test_suite@notmuchmail.org>\""
\r
546 +thread=$(notmuch search --output=threads subject:message-with-invalid-from)
\r
547 +test_emacs "(notmuch-show \"$thread\")
\r
549 +cat <<EOF >EXPECTED
\r
550 +"Invalid " (2001-01-05) (inbox)
\r
551 +Subject: message-with-invalid-from
\r
552 +To: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
553 +Date: Fri, 05 Jan 2001 15:43:57 +0000
\r
555 +This is just a test message (#1)
\r
557 +test_expect_equal_file OUTPUT EXPECTED
\r
559 +os_x_darwin_thread=$(notmuch search --output=threads id:ddd65cda0911171950o4eea4389v86de9525e46052d3@mail.gmail.com)
\r
561 +test_begin_subtest "Add tag"
\r
562 +test_emacs "(notmuch-show \"$os_x_darwin_thread\")
\r
563 + (execute-kbd-macro \"+tag-from-show-view\")"
\r
564 +output=$(notmuch search $os_x_darwin_thread | notmuch_search_sanitize)
\r
565 +test_expect_equal "$output" "thread:XXX 2009-11-18 [4/4] Jjgod Jiang, Alexander Botero-Lowry; [notmuch] Mac OS X/Darwin compatibility issues (inbox tag-from-show-view unread)"
\r
567 +test_begin_subtest "Remove tag"
\r
568 +test_emacs "(notmuch-show \"$os_x_darwin_thread\")
\r
569 + (execute-kbd-macro \"-tag-from-show-view\")"
\r
570 +output=$(notmuch search $os_x_darwin_thread | notmuch_search_sanitize)
\r
571 +test_expect_equal "$output" "thread:XXX 2009-11-18 [4/4] Jjgod Jiang, Alexander Botero-Lowry; [notmuch] Mac OS X/Darwin compatibility issues (inbox unread)"
\r
573 test_begin_subtest "Hiding Original Message region at beginning of a message"
\r
574 message_id='OriginalMessageHiding.1@notmuchmail.org'
\r
576 @@ -24,6 +85,172 @@ test_emacs "(notmuch-show \"id:$message_id\")
\r
577 (test-visible-output)"
\r
578 test_expect_equal_file OUTPUT EXPECTED
\r
580 +test_begin_subtest "Do not call notmuch for non-inlinable application/mpeg parts"
\r
581 +id='message-with-application/mpeg-attachment@notmuchmail.org'
\r
582 +emacs_deliver_message \
\r
583 + 'Message with application/mpeg attachment' \
\r
585 + "(message-goto-eoh)
\r
586 + (insert \"Message-ID: <$id>\n\")
\r
587 + (message-goto-body)
\r
588 + (mml-insert-part \"application/mpeg\")
\r
589 + (insert \"a fake mp3 file\")"
\r
590 +notmuch_counter_reset
\r
591 +test_emacs "(let ((notmuch-command \"$notmuch_counter_command\"))
\r
592 + (notmuch-show \"id:$id\"))"
\r
593 +test_expect_equal $(notmuch_counter_value) 1
\r
595 +test_begin_subtest "Do not call notmuch for non-inlinable audio/mpeg parts"
\r
596 +id='message-with-audio/mpeg-attachment@notmuchmail.org'
\r
597 +emacs_deliver_message \
\r
598 + 'Message with audio/mpeg attachment' \
\r
600 + "(message-goto-eoh)
\r
601 + (insert \"Message-ID: <$id>\n\")
\r
602 + (message-goto-body)
\r
603 + (mml-insert-part \"audio/mpeg\")
\r
604 + (insert \"a fake mp3 file\")"
\r
605 +notmuch_counter_reset
\r
606 +test_emacs "(let ((notmuch-command \"$notmuch_counter_command\"))
\r
607 + (notmuch-show \"id:$id\"))"
\r
608 +test_expect_equal $(notmuch_counter_value) 1
\r
610 +test_begin_subtest "Save attachment using notmuch-show-save-attachments"
\r
611 +# save as archive to test that Emacs does not re-compress .gz
\r
612 +test_emacs '(let ((standard-input "\"attachment1.gz\""))
\r
613 + (notmuch-show "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com")
\r
614 + (notmuch-show-save-attachments))'
\r
615 +test_expect_equal_file attachment1.gz "$EXPECTED/attachment"
\r
617 +test_begin_subtest "Save attachment using notmuch-show-save-part"
\r
618 +# save as archive to test that Emacs does not re-compress .gz
\r
619 +test_emacs '(let ((standard-input "\"attachment2.gz\""))
\r
620 + (notmuch-show-save-part "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com" 5))'
\r
621 +test_expect_equal_file attachment2.gz "$EXPECTED/attachment"
\r
623 +test_begin_subtest "View raw message"
\r
624 +test_emacs '(notmuch-show "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com")
\r
625 + (notmuch-show-view-raw-message)
\r
627 +test_expect_equal_file OUTPUT $EXPECTED/raw-message-cf0c4d-52ad0a
\r
629 +test_begin_subtest "Hide/show signature"
\r
630 +maildir_storage_thread=$(notmuch search --output=threads id:20091117190054.GU3165@dottiness.seas.harvard.edu)
\r
631 +test_emacs "(notmuch-show \"$maildir_storage_thread\")
\r
632 + (search-forward \"Click/Enter to show.\")
\r
633 + (button-activate (button-at (point)))
\r
634 + (search-backward \"Click/Enter to hide.\")
\r
635 + (button-activate (button-at (point)))
\r
637 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-maildir-storage
\r
639 +test_begin_subtest "Detection and hiding of top-post quoting of message"
\r
640 +add_message '[subject]="The problem with top-posting"' \
\r
641 + [id]=top-post-target \
\r
642 + '[body]="A: Because it messes up the order in which people normally read text.
\r
643 +Q: Why is top-posting such a bad thing?
\r
645 +Q: What is the most annoying thing in e-mail?"'
\r
646 +add_message '[from]="Top Poster <top@poster.com>"' \
\r
647 + [in-reply-to]=top-post-target \
\r
648 + [references]=top-post-target \
\r
649 + '[subject]="Re: The problem with top-posting"' \
\r
650 + '[body]="Thanks for the advice! I will be sure to put it to good use.
\r
654 +----- Original Message -----
\r
655 +From: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
656 +To: Notmuch Test Suite <test_suite@notmuchmai.org>
\r
657 +Sent: Fri, 05 Jan 2001 15:43:57 +0000
\r
658 +Subject: The problem with top-posting
\r
660 +Q: Why is top-posting such a bad thing?
\r
662 +Q: What is the most annoying thing in e-mail?"'
\r
663 +test_emacs "(notmuch-show \"top-posting\")
\r
664 + (test-visible-output)"
\r
665 +echo "Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-05) (inbox)
\r
666 +Subject: The problem with top-posting
\r
667 +To: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
668 +Date: Fri, 05 Jan 2001 15:43:57 +0000
\r
670 +A: Because it messes up the order in which people normally read text.
\r
671 +Q: Why is top-posting such a bad thing?
\r
673 +Q: What is the most annoying thing in e-mail?
\r
674 +Top Poster <top@poster.com> (2001-01-05) (inbox unread)
\r
675 +Subject: Re: The problem with top-posting
\r
676 +To: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
677 +Date: Fri, 05 Jan 2001 15:43:57 +0000
\r
679 +Thanks for the advice! I will be sure to put it to good use.
\r
683 +[ 9-line hidden original message. Click/Enter to show. ]" > EXPECTED
\r
684 +test_expect_equal_file OUTPUT EXPECTED
\r
686 +test_begin_subtest "Hiding message"
\r
687 +test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.gmail.com")
\r
688 + (notmuch-show-toggle-message)
\r
689 + (test-visible-output)'
\r
690 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-with-hidden-messages
\r
692 +test_begin_subtest "Hiding message with visible citation"
\r
693 +test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.gmail.com")
\r
694 + (search-forward "Click/Enter to show.")
\r
695 + (button-activate (button-at (point)))
\r
696 + (notmuch-show-toggle-message)
\r
697 + (test-visible-output)'
\r
698 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-with-hidden-messages
\r
700 +test_begin_subtest "Stash commands"
\r
701 +add_message '[date]="Sat, 01 Jan 2000 12:00:00 -0000"' \
\r
702 + '[from]="Some One <someone@somewhere.org>"' \
\r
703 + '[to]="Some One Else <notsomeone@somewhere.org>"' \
\r
704 + '[cc]="Notmuch <notmuch@notmuchmail.org>"' \
\r
705 + '[subject]="Stash my stashables"' \
\r
706 + '[id]="bought"' \
\r
707 + '[body]="Unable to stash body. Where did you get it in the first place?!?"'
\r
708 +notmuch tag +stashtest id:${gen_msg_id}
\r
709 +test_emacs '(notmuch-show "id:\"bought\"")
\r
710 + (notmuch-show-stash-date)
\r
711 + (notmuch-show-stash-from)
\r
712 + (notmuch-show-stash-to)
\r
713 + (notmuch-show-stash-cc)
\r
714 + (notmuch-show-stash-subject)
\r
715 + (notmuch-show-stash-message-id)
\r
716 + (notmuch-show-stash-message-id-stripped)
\r
717 + (notmuch-show-stash-tags)
\r
718 + (notmuch-show-stash-filename)
\r
719 + (notmuch-show-stash-mlarchive-link "Gmane")
\r
720 + (notmuch-show-stash-mlarchive-link "MARC")
\r
721 + (notmuch-show-stash-mlarchive-link "Mail Archive, The")
\r
722 + (switch-to-buffer
\r
723 + (generate-new-buffer "*test-stashing*"))
\r
727 + (rotate-yank-pointer 1))
\r
728 + (reverse-region (point-min) (point-max))
\r
730 +cat <<EOF >EXPECTED
\r
731 +Sat, 01 Jan 2000 12:00:00 +0000
\r
732 +Some One <someone@somewhere.org>
\r
733 +Some One Else <notsomeone@somewhere.org>
\r
734 +Notmuch <notmuch@notmuchmail.org>
\r
735 +Stash my stashables
\r
739 +${gen_msg_filename}
\r
740 +http://mid.gmane.org/bought
\r
741 +http://marc.info/?i=bought
\r
742 +http://mail-archive.com/search?l=mid&q=bought
\r
744 +test_expect_equal_file OUTPUT EXPECTED
\r
746 test_begin_subtest "Bare subject #1"
\r
747 output=$(test_emacs '(notmuch-show-strip-re "Re: subject")')
\r
748 test_expect_equal "$output" '"subject"'
\r
749 @@ -36,6 +263,37 @@ test_begin_subtest "Bare subject #3"
\r
750 output=$(test_emacs '(notmuch-show-strip-re "the cure: fix the regexp")')
\r
751 test_expect_equal "$output" '"the cure: fix the regexp"'
\r
753 +test_begin_subtest 'notmuch-show-advance-and-archive with invisible signature'
\r
754 +message1='id:20091118010116.GC25380@dottiness.seas.harvard.edu'
\r
755 +message2='id:1258491078-29658-1-git-send-email-dottedmag@dottedmag.net'
\r
756 +test_emacs "(notmuch-search \"$message1 or $message2\")
\r
757 + (notmuch-test-wait)
\r
758 + (notmuch-search-show-thread)
\r
759 + (goto-char (point-max))
\r
761 + (notmuch-show-advance-and-archive)
\r
763 +test_emacs "(notmuch-show \"$message2\")
\r
764 + (test-output \"EXPECTED\")"
\r
765 +test_expect_equal_file OUTPUT EXPECTED
\r
767 +test_begin_subtest "Refresh show buffer"
\r
768 +test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.gmail.com")
\r
769 + (test-visible-output "EXPECTED")
\r
770 + (notmuch-show-refresh-view)
\r
771 + (test-visible-output)'
\r
772 +test_expect_equal_file OUTPUT EXPECTED
\r
774 +test_begin_subtest "Refresh modified show buffer"
\r
775 +test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.gmail.com")
\r
776 + (notmuch-show-toggle-message)
\r
777 + (notmuch-show-next-message)
\r
778 + (notmuch-show-toggle-message)
\r
779 + (test-visible-output "EXPECTED")
\r
780 + (notmuch-show-refresh-view)
\r
781 + (test-visible-output)'
\r
782 +test_expect_equal_file OUTPUT EXPECTED
\r
784 test_begin_subtest "Toggle display multipart/alternative"
\r
785 cat <<EOF > ${MAIL_DIR}/embedded_message
\r
786 From: Carl Worth <cworth@cworth.org>
\r
787 @@ -83,4 +341,155 @@ cat <<EOF >EXPECTED.diff
\r
789 test_expect_equal_file {OUTPUT,EXPECTED}.diff
\r
791 +test_begin_subtest "Reply within emacs to a multipart/mixed message"
\r
792 +test_emacs '(let ((message-hidden-headers ''()))
\r
793 + (notmuch-show "id:20091118002059.067214ed@hikari")
\r
794 + (notmuch-show-reply)
\r
796 +sed -i -e 's,^User-Agent: Notmuch/.* Emacs/.*,User-Agent: Notmuch/XXX Emacs/XXX,' OUTPUT
\r
797 +cat <<EOF >EXPECTED
\r
798 +From: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
799 +To: Adrian Perez de Castro <aperez@igalia.com>, notmuch@notmuchmail.org
\r
800 +Subject: Re: [notmuch] Introducing myself
\r
801 +In-Reply-To: <20091118002059.067214ed@hikari>
\r
802 +Fcc: ${MAIL_DIR}/sent
\r
803 +References: <20091118002059.067214ed@hikari>
\r
804 +User-Agent: Notmuch/XXX Emacs/XXX
\r
805 +--text follows this line--
\r
806 +Adrian Perez de Castro <aperez@igalia.com> writes:
\r
810 +> I have just heard about Not Much today in some random Linux-related news
\r
811 +> site (LWN?), my name is Adrian Perez and I work as systems administrator
\r
812 +> (although I can do some code as well :P). I have always thought that the
\r
813 +> ideas behind Sup were great, but after some time using it, I got tired of
\r
814 +> the oddities that it has. I also do not like doing things like having to
\r
815 +> install Ruby just for reading and sorting mails. Some time ago I thought
\r
816 +> about doing something like Not Much and in fact I played a bit with the
\r
817 +> Python+Xapian and the Python+Whoosh combinations, because I find relaxing
\r
818 +> to code things in Python when I am not working and also it is installed
\r
819 +> by default on most distribution. I got to have some mailboxes indexed and
\r
820 +> basic searching working a couple of months ago. Lately I have been very
\r
821 +> busy and had no time for coding, and them... boom! Not Much appears -- and
\r
822 +> it is almost exactly what I was trying to do, but faster. I have been
\r
823 +> playing a bit with Not Much today, and I think it has potential.
\r
825 +> Also, I would like to share one idea I had in mind, that you might find
\r
826 +> interesting: One thing I have found very annoying is having to re-tag my
\r
827 +> mail when the indexes get b0rked (it happened a couple of times to me while
\r
828 +> using Sup), so I was planning to mails as read/unread and adding the tags
\r
829 +> not just to the index, but to the mail text itself, e.g. by adding a
\r
830 +> "X-Tags" header field or by reusing the "Keywords" one. This way, the index
\r
831 +> could be totally recreated by re-reading the mail directories, and this
\r
832 +> would also allow to a tools like OfflineIMAP [1] to get the mails into a
\r
833 +> local maildir, tagging and indexing the mails with the e-mail reader and
\r
834 +> then syncing back the messages with the "X-Tags" header to the IMAP server.
\r
835 +> This would allow to use the mail reader from a different computer and still
\r
836 +> have everything tagged finely.
\r
842 +> [1] http://software.complete.org/software/projects/show/offlineimap
\r
845 +> Adrian Perez de Castro <aperez@igalia.com>
\r
846 +> Igalia - Free Software Engineering
\r
847 +> _______________________________________________
\r
848 +> notmuch mailing list
\r
849 +> notmuch@notmuchmail.org
\r
850 +> http://notmuchmail.org/mailman/listinfo/notmuch
\r
852 +test_expect_equal_file OUTPUT EXPECTED
\r
854 +test_begin_subtest "Reply within emacs to a multipart/alternative message"
\r
855 +test_emacs '(let ((message-hidden-headers ''()))
\r
856 + (notmuch-show "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com")
\r
857 + (notmuch-show-reply)
\r
859 +sed -i -e 's,^User-Agent: Notmuch/.* Emacs/.*,User-Agent: Notmuch/XXX Emacs/XXX,' OUTPUT
\r
860 +cat <<EOF >EXPECTED
\r
861 +From: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
862 +To: Alex Botero-Lowry <alex.boterolowry@gmail.com>, notmuch@notmuchmail.org
\r
863 +Subject: Re: [notmuch] preliminary FreeBSD support
\r
864 +In-Reply-To: <cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com>
\r
865 +Fcc: ${MAIL_DIR}/sent
\r
866 +References: <cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com>
\r
867 +User-Agent: Notmuch/XXX Emacs/XXX
\r
868 +--text follows this line--
\r
869 +Alex Botero-Lowry <alex.boterolowry@gmail.com> writes:
\r
871 +> I saw the announcement this morning, and was very excited, as I had been
\r
872 +> hoping sup would be turned into a library,
\r
873 +> since I like the concept more than the UI (I'd rather an emacs interface).
\r
875 +> I did a preliminary compile which worked out fine, but
\r
876 +> sysconf(_SC_SC_GETPW_R_SIZE_MAX) returns -1 on
\r
877 +> FreeBSD, so notmuch_config_open segfaulted.
\r
879 +> Attached is a patch that supplies a default buffer size of 64 in cases where
\r
882 +> http://www.opengroup.org/austin/docs/austin_328.txt - seems to indicate this
\r
883 +> is acceptable behavior,
\r
884 +> and http://mail-index.netbsd.org/pkgsrc-bugs/2006/06/07/msg016808.htmlspecifically
\r
887 +> _______________________________________________
\r
888 +> notmuch mailing list
\r
889 +> notmuch@notmuchmail.org
\r
890 +> http://notmuchmail.org/mailman/listinfo/notmuch
\r
892 +test_expect_equal_file OUTPUT EXPECTED
\r
894 +test_begin_subtest "Reply within emacs to an html-only message"
\r
895 +add_message '[content-type]="text/html"' \
\r
896 + '[body]="Hi,<br />This is an <b>HTML</b> test message.<br /><br />OK?"'
\r
897 +test_emacs "(let ((message-hidden-headers '()) (mm-text-html-renderer 'html2text))
\r
898 + (notmuch-show \"id:${gen_msg_id}\")
\r
899 + (notmuch-show-reply)
\r
901 +sed -i -e 's,^User-Agent: Notmuch/.* Emacs/.*,User-Agent: Notmuch/XXX Emacs/XXX,' OUTPUT
\r
902 +cat <<EOF >EXPECTED
\r
903 +From: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
905 +Subject: Re: Reply within emacs to an html-only message
\r
906 +In-Reply-To: <${gen_msg_id}>
\r
907 +Fcc: ${MAIL_DIR}/sent
\r
908 +References: <${gen_msg_id}>
\r
909 +User-Agent: Notmuch/XXX Emacs/XXX
\r
910 +--text follows this line--
\r
911 +Notmuch Test Suite <test_suite@notmuchmail.org> writes:
\r
913 +> Hi,This is an HTML test message.OK?
\r
915 +test_expect_equal_file OUTPUT EXPECTED
\r
917 +test_begin_subtest "Quote MML tags in reply"
\r
918 +message_id='test-emacs-mml-quoting@message.id'
\r
919 +add_message [id]="$message_id" \
\r
920 + "[subject]='$test_subtest_name'" \
\r
921 + '[body]="<#part disposition=inline>"'
\r
922 +test_emacs "(let ((message-hidden-headers '()))
\r
923 + (notmuch-show \"id:$message_id\")
\r
924 + (notmuch-show-reply)
\r
926 +sed -i -e 's,^User-Agent: Notmuch/.* Emacs/.*,User-Agent: Notmuch/XXX Emacs/XXX,' OUTPUT
\r
927 +cat <<EOF >EXPECTED
\r
928 +From: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
930 +Subject: Re: Quote MML tags in reply
\r
931 +In-Reply-To: <test-emacs-mml-quoting@message.id>
\r
932 +Fcc: ${MAIL_DIR}/sent
\r
933 +References: <test-emacs-mml-quoting@message.id>
\r
934 +User-Agent: Notmuch/XXX Emacs/XXX
\r
935 +--text follows this line--
\r
936 +Notmuch Test Suite <test_suite@notmuchmail.org> writes:
\r
938 +> <#!part disposition=inline>
\r
940 +test_expect_equal_file OUTPUT EXPECTED
\r