Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 05 / 86b651787da833b86375368eac693a9f8e6350
1 Return-Path: <daniel.schoepe@googlemail.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 EE6A9431FB6\r
6         for <notmuch@notmuchmail.org>; Thu,  7 Jul 2011 15:54:05 -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.799\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id qJ8MFvX6KDC8 for <notmuch@notmuchmail.org>;\r
17         Thu,  7 Jul 2011 15:54:04 -0700 (PDT)\r
18 Received: from mail-fx0-f46.google.com (mail-fx0-f46.google.com\r
19         [209.85.161.46]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id AE26C429E2D\r
22         for <notmuch@notmuchmail.org>; Thu,  7 Jul 2011 15:54:00 -0700 (PDT)\r
23 Received: by mail-fx0-f46.google.com with SMTP id 19so1576280fxh.19\r
24         for <notmuch@notmuchmail.org>; Thu, 07 Jul 2011 15:54:00 -0700 (PDT)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
26         d=googlemail.com; s=gamma;\r
27         h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
28         bh=DXHdbKbkEhfb9Wy+kpXEGa8/ITsDHJTOToJFoipDHl4=;\r
29         b=lPwqRN/OFHa/+uYzrRr+wX3dG0KuTaxknPbJgnyPg5p7U28/WiJmgwzbA5mfiOwnv8\r
30         RcGFkakikQk1uUFtlQEBIZksY6Ca/kSbJUrUIbxGQqd0oGCfRabRX9FFNSLAP3gdAsVC\r
31         gqsbKLW3ZerQ9a0gTNGMy9pmn0Z4p3nAHyU0I=\r
32 Received: by 10.223.144.134 with SMTP id z6mr2021186fau.8.1310079240351;\r
33         Thu, 07 Jul 2011 15:54:00 -0700 (PDT)\r
34 Received: from localhost (dslb-088-069-138-212.pools.arcor-ip.net\r
35         [88.69.138.212])\r
36         by mx.google.com with ESMTPS id f3sm6995811faa.6.2011.07.07.15.53.58\r
37         (version=TLSv1/SSLv3 cipher=OTHER);\r
38         Thu, 07 Jul 2011 15:53:59 -0700 (PDT)\r
39 From: Daniel Schoepe <daniel.schoepe@googlemail.com>\r
40 To: notmuch@notmuchmail.org\r
41 Subject: [PATCH v4 2/2] emacs: Tests for user-defined sections\r
42 Date: Fri,  8 Jul 2011 00:53:47 +0200\r
43 Message-Id: <1310079227-19120-3-git-send-email-daniel.schoepe@googlemail.com>\r
44 X-Mailer: git-send-email 1.7.5.4\r
45 In-Reply-To: <1310079227-19120-1-git-send-email-daniel.schoepe@googlemail.com>\r
46 References:\r
47  <id:"1309379221-5617-1-git-send-email-daniel.schoepe@googlemail.com">\r
48         <1310079227-19120-1-git-send-email-daniel.schoepe@googlemail.com>\r
49 X-BeenThere: notmuch@notmuchmail.org\r
50 X-Mailman-Version: 2.1.13\r
51 Precedence: list\r
52 List-Id: "Use and development of the notmuch mail system."\r
53         <notmuch.notmuchmail.org>\r
54 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
55         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
56 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
57 List-Post: <mailto:notmuch@notmuchmail.org>\r
58 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
59 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
60         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
61 X-List-Received-Date: Thu, 07 Jul 2011 22:54:06 -0000\r
62 \r
63 ---\r
64  test/emacs                                         |   37 ++++++++++++++++++++\r
65  test/emacs.expected-output/notmuch-hello           |    5 ++-\r
66  .../notmuch-hello-new-section                      |    4 ++\r
67  .../notmuch-hello-no-saved-searches                |    4 ++-\r
68  .../notmuch-hello-section-before                   |   18 +++++++++\r
69  .../notmuch-hello-section-counts                   |    5 +++\r
70  .../notmuch-hello-section-hidden-tag               |    4 ++\r
71  .../notmuch-hello-section-with-empty               |    4 ++\r
72  .../emacs.expected-output/notmuch-hello-with-empty |    5 ++-\r
73  9 files changed, 81 insertions(+), 5 deletions(-)\r
74  create mode 100644 test/emacs.expected-output/notmuch-hello-new-section\r
75  create mode 100644 test/emacs.expected-output/notmuch-hello-section-before\r
76  create mode 100644 test/emacs.expected-output/notmuch-hello-section-counts\r
77  create mode 100644 test/emacs.expected-output/notmuch-hello-section-hidden-tag\r
78  create mode 100644 test/emacs.expected-output/notmuch-hello-section-with-empty\r
79 \r
80 diff --git a/test/emacs b/test/emacs\r
81 index 53f455a..40e2563 100755\r
82 --- a/test/emacs\r
83 +++ b/test/emacs\r
84 @@ -34,6 +34,43 @@ test_emacs '(let ((notmuch-saved-searches\r
85               (test-output))'\r
86  test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-no-saved-searches\r
87  \r
88 +test_begin_subtest "User defined section with inbox tag"\r
89 +test_emacs "(let ((notmuch-hello-sections \r
90 +                   (list (lambda () (notmuch-hello-insert-searches\r
91 +                                     \"Test: \" '((\"inbox\" . \"tag:inbox\")))))))\r
92 +           (notmuch-hello)\r
93 +           (test-output))"\r
94 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-new-section\r
95 +\r
96 +test_begin_subtest "User defined section with empty, hidden entry"\r
97 +test_emacs "(let ((notmuch-hello-sections \r
98 +                   (list (lambda () (notmuch-hello-insert-searches\r
99 +                                     \"Test-with-empty:\" \r
100 +                                     '((\"inbox\" . \"tag:inbox\")\r
101 +                                       (\"doesnotexist\" . \"tag:doesnotexist\"))\r
102 +                                     :hide-empty-searches t)))))\r
103 +             (notmuch-hello)\r
104 +             (test-output))"\r
105 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-section-with-empty\r
106 +\r
107 +test_begin_subtest "User defined section, unread tag filtered out"\r
108 +test_emacs "(let ((notmuch-hello-sections \r
109 +                   (list (lambda () (notmuch-hello-insert-tags-section\r
110 +                                     \"Test-with-filtered: \"\r
111 +                                     :hide-tags '(\"unread\"))))))\r
112 +             (notmuch-hello)\r
113 +             (test-output))"\r
114 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-section-hidden-tag\r
115 +\r
116 +test_begin_subtest "User defined section, different query for counts"\r
117 +test_emacs "(let ((notmuch-hello-sections\r
118 +                   (list (lambda () (notmuch-hello-insert-tags-section\r
119 +                                     \"Test-with-counts: \"\r
120 +                                     :make-count \"tag:signed\")))))\r
121 +             (notmuch-hello)\r
122 +             (test-output))"\r
123 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-section-counts\r
124 +\r
125  test_begin_subtest "Basic notmuch-search view in emacs"\r
126  test_emacs '(notmuch-search "tag:inbox")\r
127             (notmuch-test-wait)\r
128 diff --git a/test/emacs.expected-output/notmuch-hello b/test/emacs.expected-output/notmuch-hello\r
129 index 64b7e42..f981650 100644\r
130 --- a/test/emacs.expected-output/notmuch-hello\r
131 +++ b/test/emacs.expected-output/notmuch-hello\r
132 @@ -1,14 +1,15 @@\r
133     Welcome to notmuch. You have 50 messages.\r
134 -\r
135  Saved searches: [edit]\r
136  \r
137           50 inbox           50 unread    \r
138  \r
139  Search:                                                                     \r
140  \r
141 -[Show all tags]\r
142 +All tags: [show]\r
143  \r
144          Type a search query and hit RET to view matching threads.\r
145                 Edit saved searches with the `edit' button.\r
146    Hit RET or click on a saved search or tag name to view matching threads.\r
147      `=' refreshes this screen. `s' jumps to the search box. `q' to quit.\r
148 +                           Customize this page.\r
149 +\r
150 diff --git a/test/emacs.expected-output/notmuch-hello-new-section b/test/emacs.expected-output/notmuch-hello-new-section\r
151 new file mode 100644\r
152 index 0000000..be7b26a\r
153 --- /dev/null\r
154 +++ b/test/emacs.expected-output/notmuch-hello-new-section\r
155 @@ -0,0 +1,4 @@\r
156 +Test: [hide]\r
157 +\r
158 +         50 inbox  \r
159 +\r
160 diff --git a/test/emacs.expected-output/notmuch-hello-no-saved-searches b/test/emacs.expected-output/notmuch-hello-no-saved-searches\r
161 index 7f8206a..37b2303 100644\r
162 --- a/test/emacs.expected-output/notmuch-hello-no-saved-searches\r
163 +++ b/test/emacs.expected-output/notmuch-hello-no-saved-searches\r
164 @@ -2,9 +2,11 @@\r
165  \r
166  Search:                                                                     \r
167  \r
168 -[Show all tags]\r
169 +All tags: [show]\r
170  \r
171          Type a search query and hit RET to view matching threads.\r
172                 Edit saved searches with the `edit' button.\r
173    Hit RET or click on a saved search or tag name to view matching threads.\r
174      `=' refreshes this screen. `s' jumps to the search box. `q' to quit.\r
175 +                           Customize this page.\r
176 +\r
177 diff --git a/test/emacs.expected-output/notmuch-hello-section-before b/test/emacs.expected-output/notmuch-hello-section-before\r
178 new file mode 100644\r
179 index 0000000..a5781ce\r
180 --- /dev/null\r
181 +++ b/test/emacs.expected-output/notmuch-hello-section-before\r
182 @@ -0,0 +1,18 @@\r
183 +   Welcome to notmuch. You have 50 messages.\r
184 +\r
185 +Saved searches: [edit]\r
186 +\r
187 +         50 inbox                 50 unread          \r
188 +\r
189 +Test-before [hide]\r
190 +\r
191 +          4 attachment             7 signed          \r
192 +         50 inbox                 50 unread          \r
193 +\r
194 +Search:                                                                     \r
195 +\r
196 +\r
197 +        Type a search query and hit RET to view matching threads.\r
198 +               Edit saved searches with the `edit' button.\r
199 +  Hit RET or click on a saved search or tag name to view matching threads.\r
200 +    `=' refreshes this screen. `s' jumps to the search box. `q' to quit.\r
201 diff --git a/test/emacs.expected-output/notmuch-hello-section-counts b/test/emacs.expected-output/notmuch-hello-section-counts\r
202 new file mode 100644\r
203 index 0000000..12d19ed\r
204 --- /dev/null\r
205 +++ b/test/emacs.expected-output/notmuch-hello-section-counts\r
206 @@ -0,0 +1,5 @@\r
207 +Test-with-counts: [hide]\r
208 +\r
209 +          2 attachment             7 inbox                  7 signed          \r
210 +          7 unread          \r
211 +\r
212 diff --git a/test/emacs.expected-output/notmuch-hello-section-hidden-tag b/test/emacs.expected-output/notmuch-hello-section-hidden-tag\r
213 new file mode 100644\r
214 index 0000000..eb21c07\r
215 --- /dev/null\r
216 +++ b/test/emacs.expected-output/notmuch-hello-section-hidden-tag\r
217 @@ -0,0 +1,4 @@\r
218 +Test-with-filtered: [hide]\r
219 +\r
220 +          4 attachment            50 inbox                  7 signed          \r
221 +\r
222 diff --git a/test/emacs.expected-output/notmuch-hello-section-with-empty b/test/emacs.expected-output/notmuch-hello-section-with-empty\r
223 new file mode 100644\r
224 index 0000000..c5b6623\r
225 --- /dev/null\r
226 +++ b/test/emacs.expected-output/notmuch-hello-section-with-empty\r
227 @@ -0,0 +1,4 @@\r
228 +Test-with-empty:[hide]\r
229 +\r
230 +         50 inbox  \r
231 +\r
232 diff --git a/test/emacs.expected-output/notmuch-hello-with-empty b/test/emacs.expected-output/notmuch-hello-with-empty\r
233 index a9ed630..7d8416d 100644\r
234 --- a/test/emacs.expected-output/notmuch-hello-with-empty\r
235 +++ b/test/emacs.expected-output/notmuch-hello-with-empty\r
236 @@ -1,14 +1,15 @@\r
237     Welcome to notmuch. You have 50 messages.\r
238 -\r
239  Saved searches: [edit]\r
240  \r
241           50 inbox           50 unread           0 empty     \r
242  \r
243  Search:                                                                     \r
244  \r
245 -[Show all tags]\r
246 +All tags: [show]\r
247  \r
248          Type a search query and hit RET to view matching threads.\r
249                 Edit saved searches with the `edit' button.\r
250    Hit RET or click on a saved search or tag name to view matching threads.\r
251      `=' refreshes this screen. `s' jumps to the search box. `q' to quit.\r
252 +                           Customize this page.\r
253 +\r
254 -- \r
255 1.7.5.4\r
256 \r