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 81B3E42118E
\r
6 for <notmuch@notmuchmail.org>; Wed, 29 Jun 2011 13:27:23 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\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 2f97JZgLj-1J for <notmuch@notmuchmail.org>;
\r
17 Wed, 29 Jun 2011 13:27:22 -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 DA86842119A
\r
22 for <notmuch@notmuchmail.org>; Wed, 29 Jun 2011 13:27:21 -0700 (PDT)
\r
23 Received: by mail-fx0-f46.google.com with SMTP id 19so1673012fxh.19
\r
24 for <notmuch@notmuchmail.org>; Wed, 29 Jun 2011 13:27:21 -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=pmKDIoJrbQJy9mqQkwZPpZOUQVQVarfB622ajrxCEXM=;
\r
29 b=fuut4R7HewicXJ+JyQd6Fs82mz36vGJZllgrnRjG/KJ6Dd2q+2MwHrGLXDyc+C4dNK
\r
30 lWQPPK4YcpcxV8HsMc0SfIVlcczpl+FSXRXsMj6stexGr+QkzDLqd9Hec78GLERZfw+k
\r
31 ySfxJLzDw/WpROIgEs8Ll+0FtW8HjLyewrS48=
\r
32 Received: by 10.223.62.194 with SMTP id y2mr1763358fah.123.1309379241520;
\r
33 Wed, 29 Jun 2011 13:27:21 -0700 (PDT)
\r
34 Received: from localhost (dslb-178-004-072-174.pools.arcor-ip.net
\r
36 by mx.google.com with ESMTPS id b13sm1104146fab.36.2011.06.29.13.27.19
\r
37 (version=TLSv1/SSLv3 cipher=OTHER);
\r
38 Wed, 29 Jun 2011 13:27:20 -0700 (PDT)
\r
39 From: Daniel Schoepe <daniel.schoepe@googlemail.com>
\r
40 To: notmuch@notmuchmail.org
\r
41 Subject: [PATCH 2/2] emacs: Tests for user-defined sections
\r
42 Date: Wed, 29 Jun 2011 22:27:01 +0200
\r
43 Message-Id: <1309379221-5617-3-git-send-email-daniel.schoepe@googlemail.com>
\r
44 X-Mailer: git-send-email 1.7.5.4
\r
45 In-Reply-To: <1309379221-5617-1-git-send-email-daniel.schoepe@googlemail.com>
\r
46 References: <1309379221-5617-1-git-send-email-daniel.schoepe@googlemail.com>
\r
47 X-BeenThere: notmuch@notmuchmail.org
\r
48 X-Mailman-Version: 2.1.13
\r
50 List-Id: "Use and development of the notmuch mail system."
\r
51 <notmuch.notmuchmail.org>
\r
52 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
53 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
54 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
55 List-Post: <mailto:notmuch@notmuchmail.org>
\r
56 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
57 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
58 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
59 X-List-Received-Date: Wed, 29 Jun 2011 20:27:23 -0000
\r
62 test/emacs | 37 ++++++++++++++++++++
\r
63 test/emacs.expected-output/notmuch-hello | 3 +-
\r
64 .../notmuch-hello-new-section | 4 ++
\r
65 .../notmuch-hello-no-saved-searches | 3 +-
\r
66 .../notmuch-hello-section-before | 18 +++++++++
\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 | 3 +-
\r
71 9 files changed, 78 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-before
\r
74 create mode 100644 test/emacs.expected-output/notmuch-hello-section-counts
\r
75 create mode 100644 test/emacs.expected-output/notmuch-hello-section-hidden-tag
\r
76 create mode 100644 test/emacs.expected-output/notmuch-hello-section-with-empty
\r
78 diff --git a/test/emacs b/test/emacs
\r
79 index e59de47..7d795d7 100755
\r
82 @@ -34,6 +34,43 @@ test_emacs '(let ((notmuch-saved-searches
\r
84 test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-no-saved-searches
\r
86 +test_begin_subtest "User defined section with inbox tag"
\r
87 +test_emacs "(let ((notmuch-hello-sections
\r
88 + (list (lambda () (notmuch-hello-insert-query-list
\r
89 + \"Test: \" '((\"inbox\" . \"tag:inbox\")))))))
\r
92 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-new-section
\r
94 +test_begin_subtest "User defined section with empty, hidden entry"
\r
95 +test_emacs "(let ((notmuch-hello-sections
\r
96 + (list (lambda () (notmuch-hello-insert-query-list
\r
97 + \"Test-with-empty:\"
\r
98 + '((\"inbox\" . \"tag:inbox\")
\r
99 + (\"doesnotexist\" . \"tag:doesnotexist\"))
\r
100 + :hide-empty-tags t)))))
\r
103 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-section-with-empty
\r
105 +test_begin_subtest "User defined section, unread tag filtered out"
\r
106 +test_emacs "(let ((notmuch-hello-sections
\r
107 + (list (lambda () (notmuch-hello-insert-tags-section
\r
108 + :title \"Test-with-filtered: \"
\r
109 + :hide-tags '(\"unread\"))))))
\r
112 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-section-hidden-tag
\r
114 +test_begin_subtest "User defined section, different query for counts"
\r
115 +test_emacs "(let ((notmuch-hello-sections
\r
116 + (list (lambda () (notmuch-hello-insert-tags-section
\r
117 + :title \"Test-with-counts: \"
\r
118 + :make-count \"tag:signed\")))))
\r
121 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-section-counts
\r
123 test_begin_subtest "Basic notmuch-search view in emacs"
\r
124 test_emacs '(notmuch-search "tag:inbox")
\r
125 (notmuch-test-wait)
\r
126 diff --git a/test/emacs.expected-output/notmuch-hello b/test/emacs.expected-output/notmuch-hello
\r
127 index 64b7e42..9666327 100644
\r
128 --- a/test/emacs.expected-output/notmuch-hello
\r
129 +++ b/test/emacs.expected-output/notmuch-hello
\r
130 @@ -6,9 +6,10 @@ Saved searches: [edit]
\r
137 Type a search query and hit RET to view matching threads.
\r
138 Edit saved searches with the `edit' button.
\r
139 Hit RET or click on a saved search or tag name to view matching threads.
\r
140 `=' refreshes this screen. `s' jumps to the search box. `q' to quit.
\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
146 +++ b/test/emacs.expected-output/notmuch-hello-new-section
\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..744a8f1 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
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
168 diff --git a/test/emacs.expected-output/notmuch-hello-section-before b/test/emacs.expected-output/notmuch-hello-section-before
\r
169 new file mode 100644
\r
170 index 0000000..a5781ce
\r
172 +++ b/test/emacs.expected-output/notmuch-hello-section-before
\r
174 + Welcome to notmuch. You have 50 messages.
\r
176 +Saved searches: [edit]
\r
178 + 50 inbox 50 unread
\r
180 +Test-before [hide]
\r
182 + 4 attachment 7 signed
\r
183 + 50 inbox 50 unread
\r
188 + Type a search query and hit RET to view matching threads.
\r
189 + Edit saved searches with the `edit' button.
\r
190 + Hit RET or click on a saved search or tag name to view matching threads.
\r
191 + `=' refreshes this screen. `s' jumps to the search box. `q' to quit.
\r
192 diff --git a/test/emacs.expected-output/notmuch-hello-section-counts b/test/emacs.expected-output/notmuch-hello-section-counts
\r
193 new file mode 100644
\r
194 index 0000000..12d19ed
\r
196 +++ b/test/emacs.expected-output/notmuch-hello-section-counts
\r
198 +Test-with-counts: [hide]
\r
200 + 2 attachment 7 inbox 7 signed
\r
203 diff --git a/test/emacs.expected-output/notmuch-hello-section-hidden-tag b/test/emacs.expected-output/notmuch-hello-section-hidden-tag
\r
204 new file mode 100644
\r
205 index 0000000..eb21c07
\r
207 +++ b/test/emacs.expected-output/notmuch-hello-section-hidden-tag
\r
209 +Test-with-filtered: [hide]
\r
211 + 4 attachment 50 inbox 7 signed
\r
213 diff --git a/test/emacs.expected-output/notmuch-hello-section-with-empty b/test/emacs.expected-output/notmuch-hello-section-with-empty
\r
214 new file mode 100644
\r
215 index 0000000..c5b6623
\r
217 +++ b/test/emacs.expected-output/notmuch-hello-section-with-empty
\r
219 +Test-with-empty:[hide]
\r
223 diff --git a/test/emacs.expected-output/notmuch-hello-with-empty b/test/emacs.expected-output/notmuch-hello-with-empty
\r
224 index a9ed630..e9c8eb9 100644
\r
225 --- a/test/emacs.expected-output/notmuch-hello-with-empty
\r
226 +++ b/test/emacs.expected-output/notmuch-hello-with-empty
\r
227 @@ -6,9 +6,10 @@ Saved searches: [edit]
\r
234 Type a search query and hit RET to view matching threads.
\r
235 Edit saved searches with the `edit' button.
\r
236 Hit RET or click on a saved search or tag name to view matching threads.
\r
237 `=' refreshes this screen. `s' jumps to the search box. `q' to quit.
\r