Re: [PATCH 3/5] nmbug-status: Add an nmbug-status(5) man page
[notmuch-archives.git] / 8c / b36c138eb68e1b6afe91c41c65016dd06fbc6e
1 Return-Path: <daniel@schoepe.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 97A0C431FC4\r
6         for <notmuch@notmuchmail.org>; Sat, 28 Jan 2012 13:45:11 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\r
9 X-Spam-Flag: NO\r
10 X-Spam-Score: -0.8\r
11 X-Spam-Level: \r
12 X-Spam-Status: No, score=-0.8 tagged_above=-999 required=5\r
13         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\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 9Zv+mcnH-LTV for <notmuch@notmuchmail.org>;\r
18         Sat, 28 Jan 2012 13:45:09 -0800 (PST)\r
19 Received: from mail-ee0-f53.google.com (mail-ee0-f53.google.com\r
20  [74.125.83.53])        (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  002BF431FBC    for <notmuch@notmuchmail.org>; Sat, 28 Jan 2012 13:45:06 -0800\r
23  (PST)\r
24 Received: by eeke51 with SMTP id e51so1399284eek.26\r
25         for <notmuch@notmuchmail.org>; Sat, 28 Jan 2012 13:45:05 -0800 (PST)\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=schoepe.org; s=google;\r
27         h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references\r
28         :in-reply-to:references;\r
29         bh=UJxoL8MU3X79GnsWbhCFxgcVN9yP/ty9WzyMih83Ia0=;\r
30         b=BQXNlB5EIpsjq+szlJ+aqrSINQsC6A7dVYFA40JVFoq7nsDjz7nQDeJvEslvOP+sI3\r
31         chD8NS1Cyk47uvXzV/M8yuEso7Ix4nnhcaghfEmZLHKS7Xlr6KBbKZSmfNtFGDrt0Sxj\r
32         wIh82uLfULiVxmGuXJl1oPUHPnZ0qxNHyaBdI=\r
33 Received: by 10.14.126.202 with SMTP id b50mr3681396eei.66.1327787105515;\r
34         Sat, 28 Jan 2012 13:45:05 -0800 (PST)\r
35 Received: from localhost (dslb-088-069-137-009.pools.arcor-ip.net.\r
36         [88.69.137.9])\r
37         by mx.google.com with ESMTPS id c16sm49250905eei.1.2012.01.28.13.45.03\r
38         (version=TLSv1/SSLv3 cipher=OTHER);\r
39         Sat, 28 Jan 2012 13:45:04 -0800 (PST)\r
40 From: Daniel Schoepe <daniel@schoepe.org>\r
41 To: notmuch@notmuchmail.org\r
42 Subject: [PATCH v8 2/2] emacs: Tests for user-defined sections\r
43 Date: Sat, 28 Jan 2012 22:44:53 +0100\r
44 Message-Id: <1327787093-26361-3-git-send-email-daniel@schoepe.org>\r
45 X-Mailer: git-send-email 1.7.8.3\r
46 In-Reply-To: <1327787093-26361-1-git-send-email-daniel@schoepe.org>\r
47 References: <87ehujqzu6.fsf@schoepe.localhost>\r
48         <1327787093-26361-1-git-send-email-daniel@schoepe.org>\r
49 In-Reply-To: <87ehujqzu6.fsf@schoepe.localhost>\r
50 References: <87ehujqzu6.fsf@schoepe.localhost>\r
51 Cc: Daniel Schoepe <daniel.schoepe@googlemail.com>\r
52 X-BeenThere: notmuch@notmuchmail.org\r
53 X-Mailman-Version: 2.1.13\r
54 Precedence: list\r
55 List-Id: "Use and development of the notmuch mail system."\r
56         <notmuch.notmuchmail.org>\r
57 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
58         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
59 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
60 List-Post: <mailto:notmuch@notmuchmail.org>\r
61 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
62 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
63         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
64 X-List-Received-Date: Sat, 28 Jan 2012 21:45:11 -0000\r
65 \r
66 From: Daniel Schoepe <daniel.schoepe@googlemail.com>\r
67 \r
68 ---\r
69  test/emacs                                         |   37 ++++++++++++++++++++\r
70  test/emacs.expected-output/notmuch-hello           |    3 +-\r
71  .../notmuch-hello-new-section                      |    4 ++\r
72  .../notmuch-hello-no-saved-searches                |    3 +-\r
73  .../notmuch-hello-section-counts                   |    5 +++\r
74  .../notmuch-hello-section-hidden-tag               |    4 ++\r
75  .../notmuch-hello-section-with-empty               |    4 ++\r
76  .../emacs.expected-output/notmuch-hello-with-empty |    3 +-\r
77  8 files changed, 60 insertions(+), 3 deletions(-)\r
78  create mode 100644 test/emacs.expected-output/notmuch-hello-new-section\r
79  create mode 100644 test/emacs.expected-output/notmuch-hello-section-counts\r
80  create mode 100644 test/emacs.expected-output/notmuch-hello-section-hidden-tag\r
81  create mode 100644 test/emacs.expected-output/notmuch-hello-section-with-empty\r
82 \r
83 diff --git a/test/emacs b/test/emacs\r
84 index 8ca4c8a..93445d7 100755\r
85 --- a/test/emacs\r
86 +++ b/test/emacs\r
87 @@ -29,6 +29,43 @@ test_emacs '(let ((notmuch-saved-searches\r
88               (test-output))'\r
89  test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-no-saved-searches\r
90  \r
91 +test_begin_subtest "User defined section with inbox tag"\r
92 +test_emacs "(let ((notmuch-hello-sections\r
93 +                   (list (lambda () (notmuch-hello-insert-searches\r
94 +                                     \"Test\" '((\"inbox\" . \"tag:inbox\")))))))\r
95 +           (notmuch-hello)\r
96 +           (test-output))"\r
97 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-new-section\r
98 +\r
99 +test_begin_subtest "User defined section with empty, hidden entry"\r
100 +test_emacs "(let ((notmuch-hello-sections\r
101 +                   (list (lambda () (notmuch-hello-insert-searches\r
102 +                                     \"Test-with-empty\"\r
103 +                                     '((\"inbox\" . \"tag:inbox\")\r
104 +                                       (\"doesnotexist\" . \"tag:doesnotexist\"))\r
105 +                                     :hide-empty-searches t)))))\r
106 +             (notmuch-hello)\r
107 +             (test-output))"\r
108 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-section-with-empty\r
109 +\r
110 +test_begin_subtest "User defined section, unread tag filtered out"\r
111 +test_emacs "(let ((notmuch-hello-sections\r
112 +                   (list (lambda () (notmuch-hello-insert-tags-section\r
113 +                                     \"Test-with-filtered\"\r
114 +                                     :hide-tags '(\"unread\"))))))\r
115 +             (notmuch-hello)\r
116 +             (test-output))"\r
117 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-section-hidden-tag\r
118 +\r
119 +test_begin_subtest "User defined section, different query for counts"\r
120 +test_emacs "(let ((notmuch-hello-sections\r
121 +                   (list (lambda () (notmuch-hello-insert-tags-section\r
122 +                                     \"Test-with-counts\"\r
123 +                                     :filter-count \"tag:signed\")))))\r
124 +             (notmuch-hello)\r
125 +             (test-output))"\r
126 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-section-counts\r
127 +\r
128  test_begin_subtest "Basic notmuch-search view in emacs"\r
129  test_emacs '(notmuch-search "tag:inbox")\r
130             (notmuch-test-wait)\r
131 diff --git a/test/emacs.expected-output/notmuch-hello b/test/emacs.expected-output/notmuch-hello\r
132 index 3e59595..1470790 100644\r
133 --- a/test/emacs.expected-output/notmuch-hello\r
134 +++ b/test/emacs.expected-output/notmuch-hello\r
135 @@ -6,9 +6,10 @@ Saved searches: [edit]\r
136  \r
137  Search:                                                                     .\r
138  \r
139 -[Show all tags]\r
140 +All tags: [show]\r
141  \r
142          Type a search query and hit RET to view matching threads.\r
143                 Edit saved searches with the `edit' button.\r
144    Hit RET or click on a saved search or tag name to view matching threads.\r
145        `=' to refresh this screen. `s' to search messages. `q' to quit.\r
146 +                           Customize this page.\r
147 diff --git a/test/emacs.expected-output/notmuch-hello-new-section b/test/emacs.expected-output/notmuch-hello-new-section\r
148 new file mode 100644\r
149 index 0000000..c64d712\r
150 --- /dev/null\r
151 +++ b/test/emacs.expected-output/notmuch-hello-new-section\r
152 @@ -0,0 +1,4 @@\r
153 +Test: [hide]\r
154 +\r
155 +         52 inbox  \r
156 +\r
157 diff --git a/test/emacs.expected-output/notmuch-hello-no-saved-searches b/test/emacs.expected-output/notmuch-hello-no-saved-searches\r
158 index ef0e5d0..05475b1 100644\r
159 --- a/test/emacs.expected-output/notmuch-hello-no-saved-searches\r
160 +++ b/test/emacs.expected-output/notmuch-hello-no-saved-searches\r
161 @@ -2,9 +2,10 @@\r
162  \r
163  Search:                                                                     .\r
164  \r
165 -[Show all tags]\r
166 +All tags: [show]\r
167  \r
168          Type a search query and hit RET to view matching threads.\r
169                 Edit saved searches with the `edit' button.\r
170    Hit RET or click on a saved search or tag name to view matching threads.\r
171        `=' to refresh this screen. `s' to search messages. `q' to quit.\r
172 +                           Customize this page.\r
173 diff --git a/test/emacs.expected-output/notmuch-hello-section-counts b/test/emacs.expected-output/notmuch-hello-section-counts\r
174 new file mode 100644\r
175 index 0000000..9d79659\r
176 --- /dev/null\r
177 +++ b/test/emacs.expected-output/notmuch-hello-section-counts\r
178 @@ -0,0 +1,5 @@\r
179 +Test-with-counts: [hide]\r
180 +\r
181 +          2 attachment             7 signed          \r
182 +          7 inbox                  7 unread          \r
183 +\r
184 diff --git a/test/emacs.expected-output/notmuch-hello-section-hidden-tag b/test/emacs.expected-output/notmuch-hello-section-hidden-tag\r
185 new file mode 100644\r
186 index 0000000..3688e7c\r
187 --- /dev/null\r
188 +++ b/test/emacs.expected-output/notmuch-hello-section-hidden-tag\r
189 @@ -0,0 +1,4 @@\r
190 +Test-with-filtered: [hide]\r
191 +\r
192 +          4 attachment            52 inbox                  7 signed \r
193 +\r
194 diff --git a/test/emacs.expected-output/notmuch-hello-section-with-empty b/test/emacs.expected-output/notmuch-hello-section-with-empty\r
195 new file mode 100644\r
196 index 0000000..8209fed\r
197 --- /dev/null\r
198 +++ b/test/emacs.expected-output/notmuch-hello-section-with-empty\r
199 @@ -0,0 +1,4 @@\r
200 +Test-with-empty: [hide]\r
201 +\r
202 +         52 inbox  \r
203 +\r
204 diff --git a/test/emacs.expected-output/notmuch-hello-with-empty b/test/emacs.expected-output/notmuch-hello-with-empty\r
205 index 71edba7..5e53222 100644\r
206 --- a/test/emacs.expected-output/notmuch-hello-with-empty\r
207 +++ b/test/emacs.expected-output/notmuch-hello-with-empty\r
208 @@ -6,9 +6,10 @@ Saved searches: [edit]\r
209  \r
210  Search:                                                                     .\r
211  \r
212 -[Show all tags]\r
213 +All tags: [show]\r
214  \r
215          Type a search query and hit RET to view matching threads.\r
216                 Edit saved searches with the `edit' button.\r
217    Hit RET or click on a saved search or tag name to view matching threads.\r
218        `=' to refresh this screen. `s' to search messages. `q' to quit.\r
219 +                           Customize this page.\r
220 -- \r
221 1.7.8.3\r
222 \r