[PATCH] configure: add --without-api-docs option
[notmuch-archives.git] / 50 / 77e207bca7182718caa0eddf3a51f69870c862
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 4475A431FD0\r
6         for <notmuch@notmuchmail.org>; Fri, 13 May 2011 01:18:09 -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.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 VATTv-IGS-5B for <notmuch@notmuchmail.org>;\r
16         Fri, 13 May 2011 01:18:07 -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 C53D9429E38\r
21         for <notmuch@notmuchmail.org>; Fri, 13 May 2011 01:18:02 -0700 (PDT)\r
22 Received: by mail-wy0-f181.google.com with SMTP id 11so1911216wyi.26\r
23         for <notmuch@notmuchmail.org>; Fri, 13 May 2011 01:18:02 -0700 (PDT)\r
24 Received: by 10.227.181.133 with SMTP id by5mr1220505wbb.9.1305274682347;\r
25         Fri, 13 May 2011 01:18:02 -0700 (PDT)\r
26 Received: from localhost (54.209-242-81.adsl-dyn.isp.belgacom.be\r
27         [81.242.209.54])\r
28         by mx.google.com with ESMTPS id o23sm1219606wbc.44.2011.05.13.01.18.00\r
29         (version=TLSv1/SSLv3 cipher=OTHER);\r
30         Fri, 13 May 2011 01:18:01 -0700 (PDT)\r
31 From: Pieter Praet <pieter@praet.org>\r
32 To: Notmuch Mail <notmuch@notmuchmail.org>\r
33 Subject: [PATCH 3/4] test: add 'Emacs' prereq to 'emacs' tests\r
34 Date: Fri, 13 May 2011 10:17:15 +0200\r
35 Message-Id: <1305274636-19975-4-git-send-email-pieter@praet.org>\r
36 X-Mailer: git-send-email 1.7.4.1\r
37 In-Reply-To: <1305274636-19975-1-git-send-email-pieter@praet.org>\r
38 References: <1305274636-19975-1-git-send-email-pieter@praet.org>\r
39 Cc: Austin Clements <amdragon@mit.edu>\r
40 X-BeenThere: notmuch@notmuchmail.org\r
41 X-Mailman-Version: 2.1.13\r
42 Precedence: list\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: Fri, 13 May 2011 08:18:09 -0000\r
53 \r
54 Signed-off-by: Pieter Praet <pieter@praet.org>\r
55 ---\r
56  test/emacs |   40 +++++++++++++++++++++++-----------------\r
57  1 files changed, 23 insertions(+), 17 deletions(-)\r
58 \r
59 diff --git a/test/emacs b/test/emacs\r
60 index 3264bf2..011deac 100755\r
61 --- a/test/emacs\r
62 +++ b/test/emacs\r
63 @@ -2,6 +2,12 @@\r
64  test_description="emacs interface"\r
65  . test-lib.sh\r
66  \r
67 +# Emacs is a prereq.\r
68 +if test_expect_success "prereq: Emacs is present" "which emacs"; then\r
69 +    test_set_prereq EMACS\r
70 +fi\r
71 +\r
72 +\r
73  EXPECTED=../emacs.expected-output\r
74  \r
75  add_email_corpus\r
76 @@ -9,64 +15,64 @@ add_email_corpus\r
77  test_begin_subtest "Basic notmuch-hello view in emacs"\r
78  output=$(test_emacs '(notmuch-hello) (princ (buffer-string))')\r
79  expected=$(cat $EXPECTED/notmuch-hello)\r
80 -test_expect_equal "$output" "$expected"\r
81 +test_expect_equal EMACS "$output" "$expected"\r
82  \r
83  test_begin_subtest "Saved search with 0 results"\r
84  output=$(test_emacs '(setq notmuch-show-empty-saved-searches t) (setq notmuch-saved-searches '\''(("inbox" . "tag:inbox") ("unread" . "tag:unread") ("empty" . "tag:doesnotexist"))) (notmuch-hello) (princ (buffer-string))')\r
85  expected=$(cat $EXPECTED/notmuch-hello-with-empty)\r
86 -test_expect_equal "$output" "$expected"\r
87 +test_expect_equal EMACS "$output" "$expected"\r
88  \r
89  test_begin_subtest "No saved searches displayed (all with 0 results)"\r
90  output=$(test_emacs '(setq notmuch-saved-searches '\''(("empty" . "tag:doesnotexist"))) (notmuch-hello) (princ (buffer-string))')\r
91  expected=$(cat $EXPECTED/notmuch-hello-no-saved-searches)\r
92 -test_expect_equal "$output" "$expected"\r
93 +test_expect_equal EMACS "$output" "$expected"\r
94  \r
95  test_begin_subtest "Basic notmuch-search view in emacs"\r
96  output=$(test_emacs '(notmuch-search "tag:inbox") (notmuch-test-wait) (princ (buffer-string))')\r
97  expected=$(cat $EXPECTED/notmuch-search-tag-inbox)\r
98 -test_expect_equal "$output" "$expected"\r
99 +test_expect_equal EMACS "$output" "$expected"\r
100  \r
101  test_begin_subtest "Navigation of notmuch-hello to search results"\r
102  output=$(test_emacs '(notmuch-hello) (goto-char (point-min)) (re-search-forward "inbox") (widget-button-press (point)) (notmuch-test-wait) (princ (buffer-string))')\r
103  expected=$(cat $EXPECTED/notmuch-hello-view-inbox)\r
104 -test_expect_equal "$output" "$expected"\r
105 +test_expect_equal EMACS "$output" "$expected"\r
106  \r
107  test_begin_subtest "Basic notmuch-show view in emacs"\r
108  maildir_storage_thread=$(notmuch search --output=threads id:20091117190054.GU3165@dottiness.seas.harvard.edu)\r
109  output=$(test_emacs "(notmuch-show \"$maildir_storage_thread\") (princ (buffer-string))")\r
110  expected=$(cat $EXPECTED/notmuch-show-thread-maildir-storage)\r
111 -test_expect_equal "$output" "$expected"\r
112 +test_expect_equal EMACS "$output" "$expected"\r
113  \r
114  test_begin_subtest "Navigation of notmuch-search to thread view"\r
115  output=$(test_emacs '(notmuch-search "tag:inbox") (notmuch-test-wait) (goto-char (point-min)) (re-search-forward "Working with Maildir") (notmuch-search-show-thread) (notmuch-test-wait) (princ (buffer-string))')\r
116 -test_expect_equal "$output" "$expected"\r
117 +test_expect_equal EMACS "$output" "$expected"\r
118  \r
119  test_begin_subtest "Add tag from search view"\r
120  os_x_darwin_thread=$(notmuch search --output=threads id:ddd65cda0911171950o4eea4389v86de9525e46052d3@mail.gmail.com)\r
121  test_emacs "(notmuch-search \"$os_x_darwin_thread\") (notmuch-test-wait) (notmuch-search-add-tag \"tag-from-search-view\")"\r
122  output=$(notmuch search $os_x_darwin_thread | notmuch_search_sanitize)\r
123 -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
124 +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
125  \r
126  test_begin_subtest "Remove tag from search view"\r
127  test_emacs "(notmuch-search \"$os_x_darwin_thread\") (notmuch-test-wait) (notmuch-search-remove-tag \"tag-from-search-view\")"\r
128  output=$(notmuch search $os_x_darwin_thread | notmuch_search_sanitize)\r
129 -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
130 +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
131  \r
132  test_begin_subtest "Add tag from notmuch-show view"\r
133  test_emacs "(notmuch-show \"$os_x_darwin_thread\") (notmuch-show-add-tag \"tag-from-show-view\")"\r
134  output=$(notmuch search $os_x_darwin_thread | notmuch_search_sanitize)\r
135 -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
136 +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
137  \r
138  test_begin_subtest "Remove tag from notmuch-show view"\r
139  test_emacs "(notmuch-show \"$os_x_darwin_thread\") (notmuch-show-remove-tag \"tag-from-show-view\")"\r
140  output=$(notmuch search $os_x_darwin_thread | notmuch_search_sanitize)\r
141 -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
142 +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
143  \r
144  test_begin_subtest "Message with .. in Message-Id:"\r
145  add_message [id]=123..456@example '[subject]="Message with .. in Message-Id"'\r
146  test_emacs '(notmuch-search "id:\"123..456@example\"") (notmuch-test-wait) (notmuch-search-add-tag "search-add") (notmuch-search-add-tag "search-remove") (notmuch-search-remove-tag "search-remove") (notmuch-show "id:\"123..456@example\"") (notmuch-test-wait) (notmuch-show-add-tag "show-add") (notmuch-show-add-tag "show-remove") (notmuch-show-remove-tag "show-remove")'\r
147  output=$(notmuch search 'id:"123..456@example"' | notmuch_search_sanitize)\r
148 -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
149 +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
150  \r
151  test_begin_subtest "Sending a message via (fake) SMTP"\r
152  \r
153 @@ -83,7 +89,7 @@ wait ${smtp_dummy_pid}\r
154  output=$(sed \\r
155      -e s',^User-Agent: Notmuch/.* Emacs/.*,User-Agent: Notmuch/XXX Emacs/XXX,' \\r
156      -e s',^Message-ID: <.*>$,Message-ID: <XXX>,' < sent_message)\r
157 -test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
158 +test_expect_equal EMACS "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
159  To: user@example.com\r
160  Subject: Testing message sent via SMTP\r
161  Date: Fri, 29 Mar 1974 10:00:00 -0000\r
162 @@ -97,13 +103,13 @@ This is a test that messages are sent via SMTP"\r
163  test_begin_subtest "Verify that sent messages are saved/searchable (via FCC)"\r
164  notmuch new > /dev/null\r
165  output=$(notmuch search 'subject:"testing message sent via SMTP"' | notmuch_search_sanitize)\r
166 -test_expect_equal "$output" "thread:XXX   1974-03-29 [1/1] Notmuch Test Suite; Testing message sent via SMTP (inbox)"\r
167 +test_expect_equal EMACS "$output" "thread:XXX   1974-03-29 [1/1] Notmuch Test Suite; Testing message sent via SMTP (inbox)"\r
168  \r
169  test_begin_subtest "Reply within emacs"\r
170  # We sed away everything before the ^From in the output to avoid getting\r
171  # confused by messages such as "Parsing /home/cworth/.mailrc... done"\r
172  output=$(test_emacs '(notmuch-search "subject:\"testing message sent via SMTP\"") (notmuch-test-wait) (notmuch-search-reply-to-thread) (princ (buffer-string))' | sed -ne '/^From/,$ p' | sed -e 's/^In-Reply-To: <.*>$/In-Reply-To: <XXX>/')\r
173 -test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
174 +test_expect_equal EMACS "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
175  To: user@example.com\r
176  Subject: Re: Testing message sent via SMTP\r
177  In-Reply-To: <XXX>\r
178 @@ -116,12 +122,12 @@ test_begin_subtest "Save attachment from within emacs"\r
179  echo "./attachment" | test_emacs '(notmuch-show "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com") (notmuch-show-save-attachments)' > /dev/null 2>&1\r
180  output=$(cat attachment)\r
181  expected=$(cat $EXPECTED/attachment)\r
182 -test_expect_equal "$output" "$expected"\r
183 +test_expect_equal EMACS "$output" "$expected"\r
184  \r
185  test_begin_subtest "View raw message within emacs"\r
186  expected=$(cat $EXPECTED/raw-message-cf0c4d-52ad0a)\r
187  first_line=$(echo "$expected" | head -n1)\r
188  output=$(test_emacs '(notmuch-show "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com") (notmuch-show-view-raw-message) (princ (buffer-string))' | sed -ne "/$first_line/,\$ p")\r
189 -test_expect_equal "$output" "$expected"\r
190 +test_expect_equal EMACS "$output" "$expected"\r
191  \r
192  test_done\r
193 -- \r
194 1.7.4.1\r
195 \r