Re: [PATCH 0/4] Allow specifying alternate names for addresses in other_email
[notmuch-archives.git] / 19 / b05967770ecea6cd3672737b08143ff98ade85
1 Return-Path: <markwalters1009@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 9E965431FBC\r
6         for <notmuch@notmuchmail.org>; Mon, 29 Oct 2012 01:37:51 -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.201\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
14         RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
15 Received: from olra.theworths.org ([127.0.0.1])\r
16         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
17         with ESMTP id ORRS2qa8qnmF for <notmuch@notmuchmail.org>;\r
18         Mon, 29 Oct 2012 01:37:47 -0700 (PDT)\r
19 Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com\r
20  [74.125.82.45])        (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
21  certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
22  48B25431FAF    for <notmuch@notmuchmail.org>; Mon, 29 Oct 2012 01:37:47 -0700\r
23  (PDT)\r
24 Received: by mail-wg0-f45.google.com with SMTP id dq12so2960579wgb.2\r
25         for <notmuch@notmuchmail.org>; Mon, 29 Oct 2012 01:37:44 -0700 (PDT)\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
27         h=from:to:cc:subject:date:message-id:x-mailer:mime-version\r
28         :content-type:content-transfer-encoding;\r
29         bh=zNSM7C/DY8PdySu0PkT1uHnudyfT3n6xV3HaOzoNEaM=;\r
30         b=DB6lOD8ByQOSYaaUXZfldtWEM30bz/ILA4pUwp8qPGuCR7m+wRiMMrLsOOcq1uzWc+\r
31         RZH3cX9XtvcBT/EtML5Tw3fCX1W7iqLsDkTd2Qp/wzkvUQU58BFtN/9ehP0fFTSQrzYl\r
32         ocNQTf1tXFBHqnUyzTa187yWY0RJU4Xe8gFfc4Pz5XW5FkYQLUvThYCfptv0hAkNf7/E\r
33         MJW3m7CMzcuDS3bU0R6NwKTQcG5fmxiteGiQGONWaDnLwBlZJL6zHQqdiZwDyRSbm70X\r
34         Xy6fIbukDv09QxajoHY/mSrYWJ8x3AxXDvz7vxs0EfdkkzJlWLh7GVAtZSgXIlyNI7uM\r
35         /Slg==\r
36 Received: by 10.180.94.102 with SMTP id db6mr13846274wib.20.1351499864517;\r
37         Mon, 29 Oct 2012 01:37:44 -0700 (PDT)\r
38 Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])\r
39         by mx.google.com with ESMTPS id gm7sm10249555wib.10.2012.10.29.01.37.42\r
40         (version=TLSv1/SSLv3 cipher=OTHER);\r
41         Mon, 29 Oct 2012 01:37:43 -0700 (PDT)\r
42 From: Mark Walters <markwalters1009@gmail.com>\r
43 To: notmuch@notmuchmail.org\r
44 Subject: =?UTF-8?q?=5BPATCH=5D=20contrib=3A=20notmuch-pick=3A=20add=20tests?=\r
45 Date: Mon, 29 Oct 2012 08:37:36 +0000\r
46 Message-Id: <1351499856-14136-1-git-send-email-markwalters1009@gmail.com>\r
47 X-Mailer: git-send-email 1.7.9.1\r
48 MIME-Version: 1.0\r
49 Content-Type: text/plain; charset=UTF-8\r
50 Content-Transfer-Encoding: 8bit\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: Mon, 29 Oct 2012 08:37:51 -0000\r
64 \r
65 The test should be run using the wrapper test-wrapper.sh.  This links\r
66 the tests into the normal notmuch TEST_DIRECTORY and runs them from\r
67 there. After the test is complete then the links are removed.\r
68 ---\r
69 \r
70 Here are some tests for notmuch-pick. I would have liked to include\r
71 the test structure and run them from inside the pick contrib directory\r
72 but I couldn't get all the paths to work.\r
73 \r
74 Hence, this slightly hacky solution of linking the relevant stuff (one\r
75 test script and one expected output directory) into the normal notmuch\r
76 test directory and running from there.                     \r
77 \r
78 Best wishes\r
79 \r
80 Mark\r
81 \r
82  contrib/notmuch-pick/README                        |    5 +\r
83  contrib/notmuch-pick/test-wrapper.sh               |   16 +++\r
84  contrib/notmuch-pick/test/emacs-pick               |  104 ++++++++++++++++++++\r
85  .../notmuch-pick-single-thread                     |    6 +\r
86  .../pick.expected-output/notmuch-pick-tag-inbox    |   53 ++++++++++\r
87  5 files changed, 184 insertions(+), 0 deletions(-)\r
88  create mode 100755 contrib/notmuch-pick/test-wrapper.sh\r
89  create mode 100755 contrib/notmuch-pick/test/emacs-pick\r
90  create mode 100644 contrib/notmuch-pick/test/pick.expected-output/notmuch-pick-single-thread\r
91  create mode 100644 contrib/notmuch-pick/test/pick.expected-output/notmuch-pick-tag-inbox\r
92 \r
93 diff --git a/contrib/notmuch-pick/README b/contrib/notmuch-pick/README\r
94 index 8eed974..98251f6 100644\r
95 --- a/contrib/notmuch-pick/README\r
96 +++ b/contrib/notmuch-pick/README\r
97 @@ -15,6 +15,11 @@ Then after the "(require 'notmuch)" line in your .emacs file add\r
98  the line "(require 'notmuch-pick nil t)". This will load notmuch-pick on\r
99  your next emacs start.\r
100  \r
101 +TEST\r
102 +\r
103 +Just execute test-wrapper.sh from this directory and it should all\r
104 +work. It does require that notmuch has already been built.\r
105 +\r
106  USING PICK\r
107  \r
108  The main key entries to notmuch pick are\r
109 diff --git a/contrib/notmuch-pick/test-wrapper.sh b/contrib/notmuch-pick/test-wrapper.sh\r
110 new file mode 100755\r
111 index 0000000..3ecf5b9\r
112 --- /dev/null\r
113 +++ b/contrib/notmuch-pick/test-wrapper.sh\r
114 @@ -0,0 +1,16 @@\r
115 +#!/usr/bin/env bash\r
116 +\r
117 +fail() {\r
118 +    echo ERROR $1\r
119 +    exit 1\r
120 +}\r
121 +\r
122 +export PICK_DIR=$PWD\r
123 +ln -s $PWD/test/emacs-pick ../../test/ || fail "emacs pick test exists"\r
124 +ln -s $PWD/test/pick.expected-output ../../test/ || fail "pick.expected-output exists"\r
125 +\r
126 +cd ../../test || fail "Cannot find test directory"\r
127 +./emacs-pick\r
128 +\r
129 +rm emacs-pick\r
130 +rm pick.expected-output\r
131 diff --git a/contrib/notmuch-pick/test/emacs-pick b/contrib/notmuch-pick/test/emacs-pick\r
132 new file mode 100755\r
133 index 0000000..9478732\r
134 --- /dev/null\r
135 +++ b/contrib/notmuch-pick/test/emacs-pick\r
136 @@ -0,0 +1,104 @@\r
137 +#!/usr/bin/env bash\r
138 +\r
139 +test_description="emacs interface"\r
140 +. test-lib.sh\r
141 +\r
142 +EXPECTED=$TEST_DIRECTORY/pick.expected-output\r
143 +\r
144 +add_email_corpus\r
145 +test_begin_subtest "Do we have emacs"\r
146 +test_emacs '(insert "hello\n")\r
147 +            (test-output)'\r
148 +cat <<EOF >EXPECTED\r
149 +hello\r
150 +EOF\r
151 +test_expect_equal_file OUTPUT EXPECTED\r
152 +\r
153 +test_begin_subtest "Basic notmuch-pick view in emacs"\r
154 +test_emacs '(add-to-list (quote load-path) "'$PICK_DIR'")\r
155 +            (require (quote notmuch-pick))\r
156 +            (notmuch-pick "tag:inbox")\r
157 +            (notmuch-test-wait)\r
158 +            (test-output)'\r
159 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-pick-tag-inbox\r
160 +\r
161 +test_begin_subtest "Basic notmuch-pick view in emacs (sync)"\r
162 +test_emacs '(setq notmuch-pick-asynchronous-parser nil)\r
163 +            (notmuch-pick "tag:inbox")\r
164 +            (notmuch-test-wait)\r
165 +            (test-output)'\r
166 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-pick-tag-inbox\r
167 +\r
168 +test_begin_subtest "Navigation of notmuch-hello to search results"\r
169 +test_emacs '(notmuch-hello)\r
170 +            (goto-char (point-min))\r
171 +            (re-search-forward "inbox")\r
172 +            (widget-button-press (1- (point)))\r
173 +            (notmuch-test-wait)\r
174 +           (notmuch-pick-from-search-current-query)\r
175 +            (notmuch-test-wait)\r
176 +            (test-output)'\r
177 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-pick-tag-inbox\r
178 +\r
179 +test_begin_subtest "Navigation of notmuch-hello to search results (sync)"\r
180 +test_emacs '(setq notmuch-pick-asynchronous-parser nil)\r
181 +            (notmuch-hello)\r
182 +            (goto-char (point-min))\r
183 +            (re-search-forward "inbox")\r
184 +            (widget-button-press (1- (point)))\r
185 +            (notmuch-test-wait)\r
186 +           (notmuch-pick-from-search-current-query)\r
187 +            (notmuch-test-wait)\r
188 +            (test-output)'\r
189 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-pick-tag-inbox\r
190 +\r
191 +test_begin_subtest "Pick of a single thread (from search)"\r
192 +test_emacs '(notmuch-hello)\r
193 +            (goto-char (point-min))\r
194 +            (re-search-forward "inbox")\r
195 +            (widget-button-press (1- (point)))\r
196 +            (notmuch-test-wait)\r
197 +            (notmuch-pick-from-search-thread)\r
198 +            (notmuch-test-wait)\r
199 +            (test-output)'\r
200 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-pick-single-thread\r
201 +\r
202 +test_begin_subtest "Pick of a single thread (sync from search)"\r
203 +test_emacs '(delete-other-windows)\r
204 +            (setq notmuch-pick-asynchronous-parser nil)\r
205 +            (notmuch-hello)\r
206 +            (goto-char (point-min))\r
207 +            (re-search-forward "inbox")\r
208 +            (widget-button-press (1- (point)))\r
209 +            (notmuch-test-wait)\r
210 +            (notmuch-pick-from-search-thread)\r
211 +            (notmuch-test-wait)\r
212 +            (test-output)'\r
213 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-pick-single-thread\r
214 +\r
215 +test_begin_subtest "Pick of a single thread (from show)"\r
216 +test_emacs '(notmuch-hello)\r
217 +            (goto-char (point-min))\r
218 +            (re-search-forward "inbox")\r
219 +            (widget-button-press (1- (point)))\r
220 +            (notmuch-test-wait)\r
221 +           (notmuch-search-show-thread)\r
222 +            (notmuch-pick-from-show-current-query)\r
223 +            (notmuch-test-wait)\r
224 +            (test-output)'\r
225 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-pick-single-thread\r
226 +\r
227 +test_begin_subtest "Pick of a single thread (sync from show)"\r
228 +test_emacs '(setq notmuch-pick-asynchronous-parser nil)\r
229 +            (notmuch-hello)\r
230 +            (goto-char (point-min))\r
231 +            (re-search-forward "inbox")\r
232 +            (widget-button-press (1- (point)))\r
233 +            (notmuch-test-wait)\r
234 +           (notmuch-search-show-thread)\r
235 +            (notmuch-pick-from-show-current-query)\r
236 +            (notmuch-test-wait)\r
237 +            (test-output)'\r
238 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-pick-single-thread\r
239 +\r
240 +test_done\r
241 diff --git a/contrib/notmuch-pick/test/pick.expected-output/notmuch-pick-single-thread b/contrib/notmuch-pick/test/pick.expected-output/notmuch-pick-single-thread\r
242 new file mode 100644\r
243 index 0000000..c9e5ef8\r
244 --- /dev/null\r
245 +++ b/contrib/notmuch-pick/test/pick.expected-output/notmuch-pick-single-thread\r
246 @@ -0,0 +1,6 @@\r
247 +  2009-11-17  Mikhail Gusarov       ┬►[notmuch] [PATCH 1/2] Close message file after parsing message       headers (inbox)\r
248 +  2009-11-17  Mikhail Gusarov       ├─►[notmuch] [PATCH 2/2] Include <stdint.h> to get uint32_t in C++   file with gcc 4.4 (inbox, unread)\r
249 +  2009-11-17  Carl Worth            ╰┬►[notmuch] [PATCH 1/2] Close message file after parsing message headers (inbox, unread)\r
250 +  2009-11-17  Keith Packard          ╰┬► ...                                              (inbox, unread)\r
251 +  2009-11-18  Carl Worth              ╰─► ...                                             (inbox, unread)\r
252 +End of search results.\r
253 diff --git a/contrib/notmuch-pick/test/pick.expected-output/notmuch-pick-tag-inbox b/contrib/notmuch-pick/test/pick.expected-output/notmuch-pick-tag-inbox\r
254 new file mode 100644\r
255 index 0000000..484141e\r
256 --- /dev/null\r
257 +++ b/contrib/notmuch-pick/test/pick.expected-output/notmuch-pick-tag-inbox\r
258 @@ -0,0 +1,53 @@\r
259 +  2010-12-29  François Boulogne     ─►[aur-general] Guidelines: cp, mkdir vs install      (inbox, unread)\r
260 +  2010-12-16  Olivier Berger        ─►Essai accentué                                      (inbox, unread)\r
261 +  2009-11-18  Chris Wilson          ─►[notmuch] [PATCH 1/2] Makefile: evaluate pkg-config once (inbox, unread)\r
262 +  2009-11-18  Alex Botero-Lowry     ┬►[notmuch] [PATCH] Error out if no query is supplied to search        instead of going into an infinite loop (attachment, inbox, unread)\r
263 +  2009-11-18  Carl Worth            ╰─►[notmuch] [PATCH] Error out if no query is supplied to search instead of going into an infinite loop (inbox, unread)\r
264 +  2009-11-17  Ingmar Vanhassel      ┬►[notmuch] [PATCH] Typsos                            (inbox, unread)\r
265 +  2009-11-18  Carl Worth            ╰─► ...                                               (inbox, unread)\r
266 +  2009-11-17  Adrian Perez de Cast  ┬►[notmuch] Introducing myself                        (inbox, signed, unread)\r
267 +  2009-11-18  Keith Packard         ├─► ...                                               (inbox, unread)\r
268 +  2009-11-18  Carl Worth            ╰─► ...                                               (inbox, unread)\r
269 +  2009-11-17  Israel Herraiz        ┬►[notmuch] New to the list                           (inbox, unread)\r
270 +  2009-11-18  Keith Packard         ├─► ...                                               (inbox, unread)\r
271 +  2009-11-18  Carl Worth            ╰─► ...                                               (inbox, unread)\r
272 +  2009-11-17  Jan Janak             ┬►[notmuch] What a great idea!                        (inbox, unread)\r
273 +  2009-11-17  Jan Janak             ├─► ...                                               (inbox, unread)\r
274 +  2009-11-18  Carl Worth            ╰─► ...                                               (inbox, unread)\r
275 +  2009-11-17  Jan Janak             ┬►[notmuch] [PATCH] Older versions of install do not support -C. (inbox, unread)\r
276 +  2009-11-18  Carl Worth            ╰─► ...                                               (inbox, unread)\r
277 +  2009-11-17  Aron Griffis          ┬►[notmuch] archive                                   (inbox, unread)\r
278 +  2009-11-18  Keith Packard         ╰┬► ...                                               (inbox, unread)\r
279 +  2009-11-18  Carl Worth             ╰─► ...                                              (inbox, unread)\r
280 +  2009-11-17  Keith Packard         ┬►[notmuch] [PATCH] Make notmuch-show 'X' (and 'x') commands remove    inbox (and unread) tags (inbox, unread)\r
281 +  2009-11-18  Carl Worth            ╰─►[notmuch] [PATCH] Make notmuch-show 'X' (and 'x') commands remove inbox (and unread) tags (inbox, unread)\r
282 +  2009-11-17  Lars Kellogg-Stedman  ┬►[notmuch] Working with Maildir storage?             (inbox, signed, unread)\r
283 +  2009-11-17  Mikhail Gusarov       ├┬► ...                                               (inbox, signed, unread)\r
284 +  2009-11-17  Lars Kellogg-Stedman  │╰┬► ...                                              (inbox, signed, unread)\r
285 +  2009-11-17  Mikhail Gusarov       │ ├─► ...                                             (inbox, unread)\r
286 +  2009-11-17  Keith Packard         │ ╰┬► ...                                             (inbox, unread)\r
287 +  2009-11-18  Lars Kellogg-Stedman  │  ╰─► ...                                            (inbox, signed, unread)\r
288 +  2009-11-18  Carl Worth            ╰─► ...                                               (inbox, unread)\r
289 +  2009-11-17  Mikhail Gusarov       ┬►[notmuch] [PATCH 1/2] Close message file after parsing message       headers (inbox, unread)\r
290 +  2009-11-17  Mikhail Gusarov       ├─►[notmuch] [PATCH 2/2] Include <stdint.h> to get uint32_t in C++   file with gcc 4.4 (inbox, unread)\r
291 +  2009-11-17  Carl Worth            ╰┬►[notmuch] [PATCH 1/2] Close message file after parsing message headers (inbox, unread)\r
292 +  2009-11-17  Keith Packard          ╰┬► ...                                              (inbox, unread)\r
293 +  2009-11-18  Carl Worth              ╰─► ...                                             (inbox, unread)\r
294 +  2009-11-18  Keith Packard         ┬►[notmuch] [PATCH] Create a default notmuch-show-hook that    highlights URLs and uses word-wrap (inbox, unread)\r
295 +  2009-11-18  Alexander Botero-Low  ╰─►[notmuch] [PATCH] Create a default notmuch-show-hook that highlights URLs and uses word-wrap (inbox, unread)\r
296 +  2009-11-18  Alexander Botero-Low  ─►[notmuch] request for pull                          (inbox, unread)\r
297 +  2009-11-18  Jjgod Jiang           ┬►[notmuch] Mac OS X/Darwin compatibility issues      (inbox, unread)\r
298 +  2009-11-18  Alexander Botero-Low  ╰┬► ...                                               (inbox, unread)\r
299 +  2009-11-18  Jjgod Jiang            ╰┬► ...                                              (inbox, unread)\r
300 +  2009-11-18  Alexander Botero-Low    ╰─► ...                                             (inbox, unread)\r
301 +  2009-11-18  Rolland Santimano     ─►[notmuch] Link to mailing list archives ?           (inbox, unread)\r
302 +  2009-11-18  Jan Janak             ─►[notmuch] [PATCH] notmuch new: Support for conversion of spool       subdirectories into tags (inbox, unread)\r
303 +  2009-11-18  Stewart Smith         ─►[notmuch] [PATCH] count_files: sort directory in inode order before  statting (inbox, unread)\r
304 +  2009-11-18  Stewart Smith         ─►[notmuch] [PATCH 2/2] Read mail directory in inode number order (inbox, unread)\r
305 +  2009-11-18  Stewart Smith         ─►[notmuch] [PATCH] Fix linking with gcc to use g++ to link in C++     libs. (inbox, unread)\r
306 +  2009-11-18  Lars Kellogg-Stedman  ┬►[notmuch] "notmuch help" outputs to stderr?         (attachment, inbox, signed, unread)\r
307 +  2009-11-18  Lars Kellogg-Stedman  ╰─► ...                                               (attachment, inbox, signed, unread)\r
308 +  2009-11-17  Mikhail Gusarov       ─►[notmuch] [PATCH] Handle rename of message file     (inbox, unread)\r
309 +  2009-11-17  Alex Botero-Lowry     ┬►[notmuch] preliminary FreeBSD support               (attachment, inbox, unread)\r
310 +  2009-11-17  Carl Worth            ╰─► ...                                               (inbox, unread)\r
311 +End of search results.\r
312 -- \r
313 1.7.9.1\r
314 \r