Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / b9 / 56e9834fb42895fab58c42fcf0b9196f352636
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 93341429E29\r
6         for <notmuch@notmuchmail.org>; Sat,  9 Jul 2011 11:03:36 -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 tCqZiqgIsPUV for <notmuch@notmuchmail.org>;\r
17         Sat,  9 Jul 2011 11:03:34 -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 72C74429E25\r
22         for <notmuch@notmuchmail.org>; Sat,  9 Jul 2011 11:03:32 -0700 (PDT)\r
23 Received: by mail-fx0-f46.google.com with SMTP id 19so2935162fxh.19\r
24         for <notmuch@notmuchmail.org>; Sat, 09 Jul 2011 11:03:32 -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=gJxeKZO8tafGcI29UAiI9VsTAxCzOT0z1ANiDWMONYI=;\r
29         b=dkpBqMlJPweNCOET52JWVZ8/yE3G5YsnO+ADRKg+JCAMNoiCMZXwNT/pgMg96tQvbY\r
30         wkJzFJtmuUl7bycbvDlLz3nGvsEtPPzViW5kReW8omAGHvfHE10wsixPjqNyou/dT47d\r
31         VyhC3OuT5Wa1Lwc72/j0Go1S3ts/R3Ws6KwoE=\r
32 Received: by 10.223.13.69 with SMTP id b5mr4933621faa.140.1310234612172;\r
33         Sat, 09 Jul 2011 11:03:32 -0700 (PDT)\r
34 Received: from localhost (dslb-178-004-073-181.pools.arcor-ip.net\r
35         [178.4.73.181])\r
36         by mx.google.com with ESMTPS id l9sm5046429fal.43.2011.07.09.11.03.29\r
37         (version=TLSv1/SSLv3 cipher=OTHER);\r
38         Sat, 09 Jul 2011 11:03:30 -0700 (PDT)\r
39 From: Daniel Schoepe <daniel.schoepe@googlemail.com>\r
40 To: notmuch@notmuchmail.org\r
41 Subject: [PATCH v5 2/2] emacs: Tests for user-defined sections\r
42 Date: Sat,  9 Jul 2011 20:03:18 +0200\r
43 Message-Id: <1310234598-15143-3-git-send-email-daniel.schoepe@googlemail.com>\r
44 X-Mailer: git-send-email 1.7.5.4\r
45 In-Reply-To: <1310234598-15143-1-git-send-email-daniel.schoepe@googlemail.com>\r
46 References: <1310079227-19120-1-git-send-email-daniel.schoepe@googlemail.com>\r
47         <1310234598-15143-1-git-send-email-daniel.schoepe@googlemail.com>\r
48 X-BeenThere: notmuch@notmuchmail.org\r
49 X-Mailman-Version: 2.1.13\r
50 Precedence: list\r
51 List-Id: "Use and development of the notmuch mail system."\r
52         <notmuch.notmuchmail.org>\r
53 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
54         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
55 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
56 List-Post: <mailto:notmuch@notmuchmail.org>\r
57 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
58 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
59         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
60 X-List-Received-Date: Sat, 09 Jul 2011 18:03:36 -0000\r
61 \r
62 ---\r
63  test/emacs                                         |   37 ++++++++++++++++++++\r
64  test/emacs.expected-output/notmuch-hello           |    4 ++-\r
65  .../notmuch-hello-new-section                      |    4 ++\r
66  .../notmuch-hello-no-saved-searches                |    4 ++-\r
67  .../notmuch-hello-section-counts                   |    5 +++\r
68  .../notmuch-hello-section-hidden-tag               |    4 ++\r
69  .../notmuch-hello-section-with-empty               |    4 ++\r
70  .../emacs.expected-output/notmuch-hello-with-empty |    4 ++-\r
71  8 files changed, 63 insertions(+), 3 deletions(-)\r
72  create mode 100644 test/emacs.expected-output/notmuch-hello-new-section\r
73  create mode 100644 test/emacs.expected-output/notmuch-hello-section-counts\r
74  create mode 100644 test/emacs.expected-output/notmuch-hello-section-hidden-tag\r
75  create mode 100644 test/emacs.expected-output/notmuch-hello-section-with-empty\r
76 \r
77 diff --git a/test/emacs b/test/emacs\r
78 index 53f455a..2bf5c08 100755\r
79 --- a/test/emacs\r
80 +++ b/test/emacs\r
81 @@ -34,6 +34,43 @@ test_emacs '(let ((notmuch-saved-searches\r
82               (test-output))'\r
83  test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-no-saved-searches\r
84  \r
85 +test_begin_subtest "User defined section with inbox tag"\r
86 +test_emacs "(let ((notmuch-hello-sections \r
87 +                   (list (lambda () (notmuch-hello-insert-searches\r
88 +                                     \"Test\" '((\"inbox\" . \"tag:inbox\")))))))\r
89 +           (notmuch-hello)\r
90 +           (test-output))"\r
91 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-new-section\r
92 +\r
93 +test_begin_subtest "User defined section with empty, hidden entry"\r
94 +test_emacs "(let ((notmuch-hello-sections \r
95 +                   (list (lambda () (notmuch-hello-insert-searches\r
96 +                                     \"Test-with-empty\" \r
97 +                                     '((\"inbox\" . \"tag:inbox\")\r
98 +                                       (\"doesnotexist\" . \"tag:doesnotexist\"))\r
99 +                                     :hide-empty-searches t)))))\r
100 +             (notmuch-hello)\r
101 +             (test-output))"\r
102 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-section-with-empty\r
103 +\r
104 +test_begin_subtest "User defined section, unread tag filtered out"\r
105 +test_emacs "(let ((notmuch-hello-sections \r
106 +                   (list (lambda () (notmuch-hello-insert-tags-section\r
107 +                                     \"Test-with-filtered\"\r
108 +                                     :hide-tags '(\"unread\"))))))\r
109 +             (notmuch-hello)\r
110 +             (test-output))"\r
111 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-section-hidden-tag\r
112 +\r
113 +test_begin_subtest "User defined section, different query for counts"\r
114 +test_emacs "(let ((notmuch-hello-sections\r
115 +                   (list (lambda () (notmuch-hello-insert-tags-section\r
116 +                                     \"Test-with-counts\"\r
117 +                                     :filter-count \"tag:signed\")))))\r
118 +             (notmuch-hello)\r
119 +             (test-output))"\r
120 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-section-counts\r
121 +\r
122  test_begin_subtest "Basic notmuch-search view in emacs"\r
123  test_emacs '(notmuch-search "tag:inbox")\r
124             (notmuch-test-wait)\r
125 diff --git a/test/emacs.expected-output/notmuch-hello b/test/emacs.expected-output/notmuch-hello\r
126 index 64b7e42..fd512d3 100644\r
127 --- a/test/emacs.expected-output/notmuch-hello\r
128 +++ b/test/emacs.expected-output/notmuch-hello\r
129 @@ -6,9 +6,11 @@ Saved searches: [edit]\r
130  \r
131  Search:                                                                     \r
132  \r
133 -[Show all tags]\r
134 +All tags: [show]\r
135  \r
136          Type a search query and hit RET to view matching threads.\r
137                 Edit saved searches with the `edit' button.\r
138    Hit RET or click on a saved search or tag name to view matching threads.\r
139      `=' refreshes this screen. `s' jumps to the search box. `q' to quit.\r
140 +                           Customize this page.\r
141 +\r
142 diff --git a/test/emacs.expected-output/notmuch-hello-new-section b/test/emacs.expected-output/notmuch-hello-new-section\r
143 new file mode 100644\r
144 index 0000000..be7b26a\r
145 --- /dev/null\r
146 +++ b/test/emacs.expected-output/notmuch-hello-new-section\r
147 @@ -0,0 +1,4 @@\r
148 +Test: [hide]\r
149 +\r
150 +         50 inbox  \r
151 +\r
152 diff --git a/test/emacs.expected-output/notmuch-hello-no-saved-searches b/test/emacs.expected-output/notmuch-hello-no-saved-searches\r
153 index 7f8206a..37b2303 100644\r
154 --- a/test/emacs.expected-output/notmuch-hello-no-saved-searches\r
155 +++ b/test/emacs.expected-output/notmuch-hello-no-saved-searches\r
156 @@ -2,9 +2,11 @@\r
157  \r
158  Search:                                                                     \r
159  \r
160 -[Show all tags]\r
161 +All tags: [show]\r
162  \r
163          Type a search query and hit RET to view matching threads.\r
164                 Edit saved searches with the `edit' button.\r
165    Hit RET or click on a saved search or tag name to view matching threads.\r
166      `=' refreshes this screen. `s' jumps to the search box. `q' to quit.\r
167 +                           Customize this page.\r
168 +\r
169 diff --git a/test/emacs.expected-output/notmuch-hello-section-counts b/test/emacs.expected-output/notmuch-hello-section-counts\r
170 new file mode 100644\r
171 index 0000000..12d19ed\r
172 --- /dev/null\r
173 +++ b/test/emacs.expected-output/notmuch-hello-section-counts\r
174 @@ -0,0 +1,5 @@\r
175 +Test-with-counts: [hide]\r
176 +\r
177 +          2 attachment             7 inbox                  7 signed          \r
178 +          7 unread          \r
179 +\r
180 diff --git a/test/emacs.expected-output/notmuch-hello-section-hidden-tag b/test/emacs.expected-output/notmuch-hello-section-hidden-tag\r
181 new file mode 100644\r
182 index 0000000..eb21c07\r
183 --- /dev/null\r
184 +++ b/test/emacs.expected-output/notmuch-hello-section-hidden-tag\r
185 @@ -0,0 +1,4 @@\r
186 +Test-with-filtered: [hide]\r
187 +\r
188 +          4 attachment            50 inbox                  7 signed          \r
189 +\r
190 diff --git a/test/emacs.expected-output/notmuch-hello-section-with-empty b/test/emacs.expected-output/notmuch-hello-section-with-empty\r
191 new file mode 100644\r
192 index 0000000..4481dca\r
193 --- /dev/null\r
194 +++ b/test/emacs.expected-output/notmuch-hello-section-with-empty\r
195 @@ -0,0 +1,4 @@\r
196 +Test-with-empty: [hide]\r
197 +\r
198 +         50 inbox  \r
199 +\r
200 diff --git a/test/emacs.expected-output/notmuch-hello-with-empty b/test/emacs.expected-output/notmuch-hello-with-empty\r
201 index a9ed630..220fac4 100644\r
202 --- a/test/emacs.expected-output/notmuch-hello-with-empty\r
203 +++ b/test/emacs.expected-output/notmuch-hello-with-empty\r
204 @@ -6,9 +6,11 @@ Saved searches: [edit]\r
205  \r
206  Search:                                                                     \r
207  \r
208 -[Show all tags]\r
209 +All tags: [show]\r
210  \r
211          Type a search query and hit RET to view matching threads.\r
212                 Edit saved searches with the `edit' button.\r
213    Hit RET or click on a saved search or tag name to view matching threads.\r
214      `=' refreshes this screen. `s' jumps to the search box. `q' to quit.\r
215 +                           Customize this page.\r
216 +\r
217 -- \r
218 1.7.5.4\r
219 \r