Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / d7 / 6a29090948b30c048db02a19b38fbef45ec52c
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 76160429E40\r
6         for <notmuch@notmuchmail.org>; Sat, 21 Jan 2012 16:55:10 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.8\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.8 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         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 s9rvRKkQjbep for <notmuch@notmuchmail.org>;\r
17         Sat, 21 Jan 2012 16:55:09 -0800 (PST)\r
18 Received: from mail-ey0-f181.google.com (mail-ey0-f181.google.com\r
19         [209.85.215.181]) (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 61117429E54\r
22         for <notmuch@notmuchmail.org>; Sat, 21 Jan 2012 16:55:09 -0800 (PST)\r
23 Received: by eaal1 with SMTP id l1so936427eaa.26\r
24         for <notmuch@notmuchmail.org>; Sat, 21 Jan 2012 16:55:08 -0800 (PST)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=schoepe.org; s=google;\r
26         h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
27         bh=vO1vvZCZqlnIUaiNh49hwEzZkvu2mPRzFT9QYmtm4S0=;\r
28         b=Hri8QsdlhBjzFo6zD4BpugMX+K4ceGbjwwpTQBvferZIiy0lvPZ3X/WOmTfZgov6F5\r
29         H2eb1k3ZlJAlg+CboG1xF3pmv9j7wJxrcTAyoY6uYAjGkW3zPit7qEGy8qJhvzVmoy9X\r
30         bDawx4gRhaTfZpiiSWhpYt0FJfLAWLmEMyw+M=\r
31 Received: by 10.213.8.199 with SMTP id i7mr645108ebi.129.1327193708117;\r
32         Sat, 21 Jan 2012 16:55:08 -0800 (PST)\r
33 Received: from localhost (dslb-188-107-198-094.pools.arcor-ip.net.\r
34         [188.107.198.94])\r
35         by mx.google.com with ESMTPS id s16sm32828236eef.2.2012.01.21.16.55.06\r
36         (version=TLSv1/SSLv3 cipher=OTHER);\r
37         Sat, 21 Jan 2012 16:55:07 -0800 (PST)\r
38 From: Daniel Schoepe <daniel@schoepe.org>\r
39 To: notmuch@notmuchmail.org\r
40 Subject: [PATCH v7 2/2] emacs: Tests for user-defined sections\r
41 Date: Sun, 22 Jan 2012 01:54:49 +0100\r
42 Message-Id: <1327193689-6011-2-git-send-email-daniel@schoepe.org>\r
43 X-Mailer: git-send-email 1.7.8.3\r
44 In-Reply-To: <1327193689-6011-1-git-send-email-daniel@schoepe.org>\r
45 References: <87d3ac8ta9.fsf@schoepe.localhost>\r
46         <1327193689-6011-1-git-send-email-daniel@schoepe.org>\r
47 Cc: Daniel Schoepe <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: Sun, 22 Jan 2012 00:55:10 -0000\r
61 \r
62 From: Daniel Schoepe <daniel.schoepe@googlemail.com>\r
63 \r
64 ---\r
65  test/emacs                                         |   37 ++++++++++++++++++++\r
66  test/emacs.expected-output/notmuch-hello           |    4 ++-\r
67  .../notmuch-hello-new-section                      |    4 ++\r
68  .../notmuch-hello-no-saved-searches                |    4 ++-\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 |    4 ++-\r
73  8 files changed, 63 insertions(+), 3 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-counts\r
76  create mode 100644 test/emacs.expected-output/notmuch-hello-section-hidden-tag\r
77  create mode 100644 test/emacs.expected-output/notmuch-hello-section-with-empty\r
78 \r
79 diff --git a/test/emacs b/test/emacs\r
80 index ac47b16..8b1d16c 100755\r
81 --- a/test/emacs\r
82 +++ b/test/emacs\r
83 @@ -29,6 +29,43 @@ test_emacs '(let ((notmuch-saved-searches\r
84               (test-output))'\r
85  test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-no-saved-searches\r
86  \r
87 +test_begin_subtest "User defined section with inbox tag"\r
88 +test_emacs "(let ((notmuch-hello-sections \r
89 +                   (list (lambda () (notmuch-hello-insert-searches\r
90 +                                     \"Test\" '((\"inbox\" . \"tag:inbox\")))))))\r
91 +           (notmuch-hello)\r
92 +           (test-output))"\r
93 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-new-section\r
94 +\r
95 +test_begin_subtest "User defined section with empty, hidden entry"\r
96 +test_emacs "(let ((notmuch-hello-sections \r
97 +                   (list (lambda () (notmuch-hello-insert-searches\r
98 +                                     \"Test-with-empty\" \r
99 +                                     '((\"inbox\" . \"tag:inbox\")\r
100 +                                       (\"doesnotexist\" . \"tag:doesnotexist\"))\r
101 +                                     :hide-empty-searches t)))))\r
102 +             (notmuch-hello)\r
103 +             (test-output))"\r
104 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-section-with-empty\r
105 +\r
106 +test_begin_subtest "User defined section, unread tag filtered out"\r
107 +test_emacs "(let ((notmuch-hello-sections \r
108 +                   (list (lambda () (notmuch-hello-insert-tags-section\r
109 +                                     \"Test-with-filtered\"\r
110 +                                     :hide-tags '(\"unread\"))))))\r
111 +             (notmuch-hello)\r
112 +             (test-output))"\r
113 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-section-hidden-tag\r
114 +\r
115 +test_begin_subtest "User defined section, different query for counts"\r
116 +test_emacs "(let ((notmuch-hello-sections\r
117 +                   (list (lambda () (notmuch-hello-insert-tags-section\r
118 +                                     \"Test-with-counts\"\r
119 +                                     :filter-count \"tag:signed\")))))\r
120 +             (notmuch-hello)\r
121 +             (test-output))"\r
122 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-section-counts\r
123 +\r
124  test_begin_subtest "Basic notmuch-search view in emacs"\r
125  test_emacs '(notmuch-search "tag:inbox")\r
126             (notmuch-test-wait)\r
127 diff --git a/test/emacs.expected-output/notmuch-hello b/test/emacs.expected-output/notmuch-hello\r
128 index 196112e..cf49cb4 100644\r
129 --- a/test/emacs.expected-output/notmuch-hello\r
130 +++ b/test/emacs.expected-output/notmuch-hello\r
131 @@ -6,9 +6,11 @@ Saved searches: [edit]\r
132  \r
133  Search:                                                                     .\r
134  \r
135 -[Show all tags]\r
136 +All tags: [show]\r
137  \r
138          Type a search query and hit RET to view matching threads.\r
139                 Edit saved searches with the `edit' button.\r
140    Hit RET or click on a saved search or tag name to view matching threads.\r
141      `=' refreshes this screen. `s' jumps to the search box. `q' to quit.\r
142 +                           Customize this page.\r
143 +\r
144 diff --git a/test/emacs.expected-output/notmuch-hello-new-section b/test/emacs.expected-output/notmuch-hello-new-section\r
145 new file mode 100644\r
146 index 0000000..c64d712\r
147 --- /dev/null\r
148 +++ b/test/emacs.expected-output/notmuch-hello-new-section\r
149 @@ -0,0 +1,4 @@\r
150 +Test: [hide]\r
151 +\r
152 +         52 inbox  \r
153 +\r
154 diff --git a/test/emacs.expected-output/notmuch-hello-no-saved-searches b/test/emacs.expected-output/notmuch-hello-no-saved-searches\r
155 index f4cfe49..cec0f91 100644\r
156 --- a/test/emacs.expected-output/notmuch-hello-no-saved-searches\r
157 +++ b/test/emacs.expected-output/notmuch-hello-no-saved-searches\r
158 @@ -2,9 +2,11 @@\r
159  \r
160  Search:                                                                     .\r
161  \r
162 -[Show all tags]\r
163 +All tags: [show]\r
164  \r
165          Type a search query and hit RET to view matching threads.\r
166                 Edit saved searches with the `edit' button.\r
167    Hit RET or click on a saved search or tag name to view matching threads.\r
168      `=' refreshes this screen. `s' jumps to the search box. `q' to quit.\r
169 +                           Customize this page.\r
170 +\r
171 diff --git a/test/emacs.expected-output/notmuch-hello-section-counts b/test/emacs.expected-output/notmuch-hello-section-counts\r
172 new file mode 100644\r
173 index 0000000..9d79659\r
174 --- /dev/null\r
175 +++ b/test/emacs.expected-output/notmuch-hello-section-counts\r
176 @@ -0,0 +1,5 @@\r
177 +Test-with-counts: [hide]\r
178 +\r
179 +          2 attachment             7 signed          \r
180 +          7 inbox                  7 unread          \r
181 +\r
182 diff --git a/test/emacs.expected-output/notmuch-hello-section-hidden-tag b/test/emacs.expected-output/notmuch-hello-section-hidden-tag\r
183 new file mode 100644\r
184 index 0000000..3688e7c\r
185 --- /dev/null\r
186 +++ b/test/emacs.expected-output/notmuch-hello-section-hidden-tag\r
187 @@ -0,0 +1,4 @@\r
188 +Test-with-filtered: [hide]\r
189 +\r
190 +          4 attachment            52 inbox                  7 signed \r
191 +\r
192 diff --git a/test/emacs.expected-output/notmuch-hello-section-with-empty b/test/emacs.expected-output/notmuch-hello-section-with-empty\r
193 new file mode 100644\r
194 index 0000000..8209fed\r
195 --- /dev/null\r
196 +++ b/test/emacs.expected-output/notmuch-hello-section-with-empty\r
197 @@ -0,0 +1,4 @@\r
198 +Test-with-empty: [hide]\r
199 +\r
200 +         52 inbox  \r
201 +\r
202 diff --git a/test/emacs.expected-output/notmuch-hello-with-empty b/test/emacs.expected-output/notmuch-hello-with-empty\r
203 index a860a72..76ab2e1 100644\r
204 --- a/test/emacs.expected-output/notmuch-hello-with-empty\r
205 +++ b/test/emacs.expected-output/notmuch-hello-with-empty\r
206 @@ -6,9 +6,11 @@ Saved searches: [edit]\r
207  \r
208  Search:                                                                     .\r
209  \r
210 -[Show all tags]\r
211 +All tags: [show]\r
212  \r
213          Type a search query and hit RET to view matching threads.\r
214                 Edit saved searches with the `edit' button.\r
215    Hit RET or click on a saved search or tag name to view matching threads.\r
216      `=' refreshes this screen. `s' jumps to the search box. `q' to quit.\r
217 +                           Customize this page.\r
218 +\r
219 -- \r
220 1.7.8.3\r
221 \r