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 1D9F1429E32
\r
6 for <notmuch@notmuchmail.org>; Tue, 1 Nov 2011 12:50:27 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\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 aUj41cMtjEd5 for <notmuch@notmuchmail.org>;
\r
16 Tue, 1 Nov 2011 12:50:24 -0700 (PDT)
\r
17 Received: from mail-wy0-f181.google.com (mail-wy0-f181.google.com
\r
18 [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id 773ED429E2F
\r
21 for <notmuch@notmuchmail.org>; Tue, 1 Nov 2011 12:50:24 -0700 (PDT)
\r
22 Received: by mail-wy0-f181.google.com with SMTP id 8so2012948wyg.26
\r
23 for <notmuch@notmuchmail.org>; Tue, 01 Nov 2011 12:50:24 -0700 (PDT)
\r
24 Received: by 10.216.230.69 with SMTP id i47mr283127weq.61.1320177024034;
\r
25 Tue, 01 Nov 2011 12:50:24 -0700 (PDT)
\r
26 Received: from localhost ([109.131.187.47])
\r
27 by mx.google.com with ESMTPS id b5sm75968wbh.4.2011.11.01.12.50.22
\r
28 (version=TLSv1/SSLv3 cipher=OTHER);
\r
29 Tue, 01 Nov 2011 12:50:23 -0700 (PDT)
\r
30 From: Pieter Praet <pieter@praet.org>
\r
31 To: notmuch@notmuchmail.org
\r
32 Subject: [PATCH 3/4] test: add 'Emacs' prereq to dependent 'emacs' tests
\r
33 Date: Tue, 1 Nov 2011 20:49:13 +0100
\r
34 Message-Id: <1320176954-4897-4-git-send-email-pieter@praet.org>
\r
35 X-Mailer: git-send-email 1.7.7.1
\r
36 In-Reply-To: <1320176954-4897-1-git-send-email-pieter@praet.org>
\r
37 References: <1320176954-4897-1-git-send-email-pieter@praet.org>
\r
38 X-BeenThere: notmuch@notmuchmail.org
\r
39 X-Mailman-Version: 2.1.13
\r
41 List-Id: "Use and development of the notmuch mail system."
\r
42 <notmuch.notmuchmail.org>
\r
43 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
44 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
45 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
46 List-Post: <mailto:notmuch@notmuchmail.org>
\r
47 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
48 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
49 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
50 X-List-Received-Date: Tue, 01 Nov 2011 19:50:27 -0000
\r
52 Adds a new test that checks for the presence of 'emacs',
\r
53 and adds that test as a prereq to all subsequent tests
\r
56 This causes tests with unmet dependencies to be skipped.
\r
59 test/emacs | 65 ++++++++++++++++++++++++++++++++---------------------------
\r
60 1 files changed, 35 insertions(+), 30 deletions(-)
\r
62 diff --git a/test/emacs b/test/emacs
\r
63 index 0303d7d..8b1e5e4 100755
\r
67 test_description="emacs interface"
\r
70 +# Emacs is a prereq.
\r
71 +test_expect_success "prereq: Emacs is present" "which emacs" \
\r
72 + && test_set_prereq EMACS
\r
75 EXPECTED=$TEST_DIRECTORY/emacs.expected-output
\r
78 @@ -10,7 +15,7 @@ add_email_corpus
\r
79 test_begin_subtest "Basic notmuch-hello view in emacs"
\r
80 test_emacs '(notmuch-hello)
\r
82 -test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello
\r
83 +test_expect_equal_file EMACS OUTPUT $EXPECTED/notmuch-hello
\r
85 test_begin_subtest "Saved search with 0 results"
\r
86 test_emacs '(let ((notmuch-show-empty-saved-searches t)
\r
87 @@ -20,20 +25,20 @@ test_emacs '(let ((notmuch-show-empty-saved-searches t)
\r
88 ("empty" . "tag:doesnotexist"))))
\r
91 -test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-with-empty
\r
92 +test_expect_equal_file EMACS OUTPUT $EXPECTED/notmuch-hello-with-empty
\r
94 test_begin_subtest "No saved searches displayed (all with 0 results)"
\r
95 test_emacs '(let ((notmuch-saved-searches
\r
96 '\''(("empty" . "tag:doesnotexist"))))
\r
99 -test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-no-saved-searches
\r
100 +test_expect_equal_file EMACS OUTPUT $EXPECTED/notmuch-hello-no-saved-searches
\r
102 test_begin_subtest "Basic notmuch-search view in emacs"
\r
103 test_emacs '(notmuch-search "tag:inbox")
\r
104 (notmuch-test-wait)
\r
106 -test_expect_equal_file OUTPUT $EXPECTED/notmuch-search-tag-inbox
\r
107 +test_expect_equal_file EMACS OUTPUT $EXPECTED/notmuch-search-tag-inbox
\r
109 test_begin_subtest "Navigation of notmuch-hello to search results"
\r
110 test_emacs '(notmuch-hello)
\r
111 @@ -42,13 +47,13 @@ test_emacs '(notmuch-hello)
\r
112 (widget-button-press (point))
\r
113 (notmuch-test-wait)
\r
115 -test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-view-inbox
\r
116 +test_expect_equal_file EMACS OUTPUT $EXPECTED/notmuch-hello-view-inbox
\r
118 test_begin_subtest "Basic notmuch-show view in emacs"
\r
119 maildir_storage_thread=$(notmuch search --output=threads id:20091117190054.GU3165@dottiness.seas.harvard.edu)
\r
120 test_emacs "(notmuch-show \"$maildir_storage_thread\")
\r
122 -test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-maildir-storage
\r
123 +test_expect_equal_file EMACS OUTPUT $EXPECTED/notmuch-show-thread-maildir-storage
\r
125 test_begin_subtest "notmuch-show for message with invalid From"
\r
126 add_message "[subject]=\"message-with-invalid-from\"" \
\r
127 @@ -64,7 +69,7 @@ Date: Tue, 05 Jan 2001 15:43:57 -0000
\r
129 This is just a test message (#1)
\r
131 -test_expect_equal_file OUTPUT EXPECTED
\r
132 +test_expect_equal_file EMACS OUTPUT EXPECTED
\r
134 test_begin_subtest "Navigation of notmuch-search to thread view"
\r
135 test_emacs '(notmuch-search "tag:inbox")
\r
136 @@ -74,7 +79,7 @@ test_emacs '(notmuch-search "tag:inbox")
\r
137 (notmuch-search-show-thread)
\r
138 (notmuch-test-wait)
\r
140 -test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-maildir-storage
\r
141 +test_expect_equal_file EMACS OUTPUT $EXPECTED/notmuch-show-thread-maildir-storage
\r
143 test_begin_subtest "Add tag from search view"
\r
144 os_x_darwin_thread=$(notmuch search --output=threads id:ddd65cda0911171950o4eea4389v86de9525e46052d3@mail.gmail.com)
\r
145 @@ -82,26 +87,26 @@ test_emacs "(notmuch-search \"$os_x_darwin_thread\")
\r
146 (notmuch-test-wait)
\r
147 (notmuch-search-add-tag \"tag-from-search-view\")"
\r
148 output=$(notmuch search $os_x_darwin_thread | notmuch_search_sanitize)
\r
149 -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-search-view unread)"
\r
150 +test_expect_equal EMACS "$output" "thread:XXX 2009-11-18 [4/4] Jjgod Jiang, Alexander Botero-Lowry; [notmuch] Mac OS X/Darwin compatibility issues (inbox tag-from-search-view unread)"
\r
152 test_begin_subtest "Remove tag from search view"
\r
153 test_emacs "(notmuch-search \"$os_x_darwin_thread\")
\r
154 (notmuch-test-wait)
\r
155 (notmuch-search-remove-tag \"tag-from-search-view\")"
\r
156 output=$(notmuch search $os_x_darwin_thread | notmuch_search_sanitize)
\r
157 -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
158 +test_expect_equal EMACS "$output" "thread:XXX 2009-11-18 [4/4] Jjgod Jiang, Alexander Botero-Lowry; [notmuch] Mac OS X/Darwin compatibility issues (inbox unread)"
\r
160 test_begin_subtest "Add tag from notmuch-show view"
\r
161 test_emacs "(notmuch-show \"$os_x_darwin_thread\")
\r
162 (notmuch-show-add-tag \"tag-from-show-view\")"
\r
163 output=$(notmuch search $os_x_darwin_thread | notmuch_search_sanitize)
\r
164 -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
165 +test_expect_equal EMACS "$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
167 test_begin_subtest "Remove tag from notmuch-show view"
\r
168 test_emacs "(notmuch-show \"$os_x_darwin_thread\")
\r
169 (notmuch-show-remove-tag \"tag-from-show-view\")"
\r
170 output=$(notmuch search $os_x_darwin_thread | notmuch_search_sanitize)
\r
171 -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
172 +test_expect_equal EMACS "$output" "thread:XXX 2009-11-18 [4/4] Jjgod Jiang, Alexander Botero-Lowry; [notmuch] Mac OS X/Darwin compatibility issues (inbox unread)"
\r
174 test_begin_subtest "Message with .. in Message-Id:"
\r
175 add_message [id]=123..456@example '[subject]="Message with .. in Message-Id"'
\r
176 @@ -116,7 +121,7 @@ test_emacs '(notmuch-search "id:\"123..456@example\"")
\r
177 (notmuch-show-add-tag "show-remove")
\r
178 (notmuch-show-remove-tag "show-remove")'
\r
179 output=$(notmuch search 'id:"123..456@example"' | notmuch_search_sanitize)
\r
180 -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
181 +test_expect_equal EMACS "$output" "thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Message with .. in Message-Id (inbox search-add show-add)"
\r
183 test_begin_subtest "Sending a message via (fake) SMTP"
\r
184 emacs_deliver_message \
\r
185 @@ -140,7 +145,7 @@ Content-Type: text/plain; charset=us-ascii
\r
187 This is a test that messages are sent via SMTP
\r
189 -test_expect_equal_file OUTPUT EXPECTED
\r
190 +test_expect_equal_file EMACS OUTPUT EXPECTED
\r
192 test_begin_subtest "Verify that sent messages are saved/searchable (via FCC)"
\r
193 notmuch new > /dev/null
\r
194 @@ -157,7 +162,7 @@ To:
\r
196 --text follows this line--
\r
198 -test_expect_equal_file OUTPUT EXPECTED
\r
199 +test_expect_equal_file EMACS OUTPUT EXPECTED
\r
201 # Make another FCC maildir specific for the next test
\r
202 mkdir -p mail/sent-string/cur
\r
203 @@ -175,7 +180,7 @@ Subject:
\r
204 Fcc: ${MAIL_DIR}/sent-string
\r
205 --text follows this line--
\r
207 -test_expect_equal_file OUTPUT EXPECTED
\r
208 +test_expect_equal_file EMACS OUTPUT EXPECTED
\r
210 # Make more FCC maildirs specific for the next test
\r
211 mkdir -p mail/sent-list-match/cur
\r
212 @@ -198,7 +203,7 @@ Subject:
\r
213 Fcc: ${MAIL_DIR}/sent-list-match
\r
214 --text follows this line--
\r
216 -test_expect_equal_file OUTPUT EXPECTED
\r
217 +test_expect_equal_file EMACS OUTPUT EXPECTED
\r
219 # Make another FCC maildir specific for the next test
\r
220 mkdir -p mail/sent-list-catch-all/cur
\r
221 @@ -218,7 +223,7 @@ Subject:
\r
222 Fcc: ${MAIL_DIR}/sent-list-catch-all
\r
223 --text follows this line--
\r
225 -test_expect_equal_file OUTPUT EXPECTED
\r
226 +test_expect_equal_file EMACS OUTPUT EXPECTED
\r
228 test_begin_subtest "notmuch-fcc-dirs set to a list (no match)"
\r
229 test_emacs "(let ((notmuch-fcc-dirs
\r
230 @@ -232,7 +237,7 @@ To:
\r
232 --text follows this line--
\r
234 -test_expect_equal_file OUTPUT EXPECTED
\r
235 +test_expect_equal_file EMACS OUTPUT EXPECTED
\r
237 test_begin_subtest "Reply within emacs"
\r
238 test_emacs '(notmuch-search "subject:\"testing message sent via SMTP\"")
\r
239 @@ -250,26 +255,26 @@ Fcc: $(pwd)/mail/sent
\r
240 On 01 Jan 2000 12:00:00 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> wrote:
\r
241 > This is a test that messages are sent via SMTP
\r
243 -test_expect_equal_file OUTPUT EXPECTED
\r
244 +test_expect_equal_file EMACS OUTPUT EXPECTED
\r
246 test_begin_subtest "Save attachment from within emacs using notmuch-show-save-attachments"
\r
247 # save as archive to test that Emacs does not re-compress .gz
\r
248 test_emacs '(let ((standard-input "\"attachment1.gz\""))
\r
249 (notmuch-show "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com")
\r
250 (notmuch-show-save-attachments))' > /dev/null 2>&1
\r
251 -test_expect_equal_file attachment1.gz "$EXPECTED/attachment"
\r
252 +test_expect_equal_file EMACS attachment1.gz "$EXPECTED/attachment"
\r
254 test_begin_subtest "Save attachment from within emacs using notmuch-show-save-part"
\r
255 # save as archive to test that Emacs does not re-compress .gz
\r
256 test_emacs '(let ((standard-input "\"attachment2.gz\""))
\r
257 (notmuch-show-save-part "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com" 5))' > /dev/null 2>&1
\r
258 -test_expect_equal_file attachment2.gz "$EXPECTED/attachment"
\r
259 +test_expect_equal_file EMACS attachment2.gz "$EXPECTED/attachment"
\r
261 test_begin_subtest "View raw message within emacs"
\r
262 test_emacs '(notmuch-show "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com")
\r
263 (notmuch-show-view-raw-message)
\r
265 -test_expect_equal_file OUTPUT $EXPECTED/raw-message-cf0c4d-52ad0a
\r
266 +test_expect_equal_file EMACS OUTPUT $EXPECTED/raw-message-cf0c4d-52ad0a
\r
268 test_begin_subtest "Hiding/showing signature in notmuch-show view"
\r
269 maildir_storage_thread=$(notmuch search --output=threads id:20091117190054.GU3165@dottiness.seas.harvard.edu)
\r
270 @@ -279,7 +284,7 @@ test_emacs "(notmuch-show \"$maildir_storage_thread\")
\r
271 (search-backward \"Click/Enter to hide.\")
\r
272 (button-activate (button-at (point)))
\r
274 -test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-maildir-storage
\r
275 +test_expect_equal_file EMACS OUTPUT $EXPECTED/notmuch-show-thread-maildir-storage
\r
277 test_begin_subtest "Detection and hiding of top-post quoting of message"
\r
278 add_message '[subject]="The problem with top-posting"' \
\r
279 @@ -326,13 +331,13 @@ Thanks for the advice! I will be sure to put it to good use.
\r
282 [ 9-line hidden original message. Click/Enter to show. ]" > EXPECTED
\r
283 -test_expect_equal_file OUTPUT EXPECTED
\r
284 +test_expect_equal_file EMACS OUTPUT EXPECTED
\r
286 test_begin_subtest "Hiding message in notmuch-show view"
\r
287 test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.gmail.com")
\r
288 (notmuch-show-toggle-message)
\r
289 (test-visible-output)'
\r
290 -test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-with-hidden-messages
\r
291 +test_expect_equal_file EMACS OUTPUT $EXPECTED/notmuch-show-thread-with-hidden-messages
\r
293 test_begin_subtest "Hiding message with visible citation in notmuch-show view"
\r
294 test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.gmail.com")
\r
295 @@ -340,7 +345,7 @@ test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.
\r
296 (button-activate (button-at (point)))
\r
297 (notmuch-show-toggle-message)
\r
298 (test-visible-output)'
\r
299 -test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-with-hidden-messages
\r
300 +test_expect_equal_file EMACS OUTPUT $EXPECTED/notmuch-show-thread-with-hidden-messages
\r
302 test_begin_subtest 'Hiding message following HTML part'
\r
303 test_subtest_known_broken
\r
304 @@ -366,14 +371,14 @@ test_emacs "(notmuch-show \"id:$id\") \
\r
305 (notmuch-show-next-message) \
\r
306 (notmuch-show-toggle-message) \
\r
307 (test-visible-output \"EXPECTED\")"
\r
308 -test_expect_equal_file OUTPUT EXPECTED
\r
309 +test_expect_equal_file EMACS OUTPUT EXPECTED
\r
311 test_begin_subtest "Refresh show buffer"
\r
312 test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.gmail.com")
\r
313 (test-visible-output "EXPECTED")
\r
314 (notmuch-show-refresh-view)
\r
315 (test-visible-output)'
\r
316 -test_expect_equal_file OUTPUT EXPECTED
\r
317 +test_expect_equal_file EMACS OUTPUT EXPECTED
\r
319 test_begin_subtest "Refresh modified show buffer"
\r
320 test_subtest_known_broken
\r
321 @@ -384,6 +389,6 @@ test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.
\r
322 (test-visible-output "EXPECTED")
\r
323 (notmuch-show-refresh-view)
\r
324 (test-visible-output)'
\r
325 -test_expect_equal_file OUTPUT EXPECTED
\r
326 +test_expect_equal_file EMACS OUTPUT EXPECTED
\r