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 8D72A429E27
\r
6 for <notmuch@notmuchmail.org>; Tue, 5 Jul 2011 09:24:10 -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 WAQdFsyYmnw9 for <notmuch@notmuchmail.org>;
\r
17 Tue, 5 Jul 2011 09:24:08 -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 E4A6B429E25
\r
22 for <notmuch@notmuchmail.org>; Tue, 5 Jul 2011 09:24:07 -0700 (PDT)
\r
23 Received: by mail-fx0-f46.google.com with SMTP id 19so6243003fxh.19
\r
24 for <notmuch@notmuchmail.org>; Tue, 05 Jul 2011 09:24:07 -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=mNuse4y3vg+EqPDE6In494BOPtAEqcPLtL4TskKN6SE=;
\r
29 b=a93FCJqIc8ribnZ9gjYXgvD2hQ4m9CrDlFqcRYLhfFrhwKXkUspmfYZD3E6/glRta3
\r
30 dQW2ff2zWiy4xebEjbD0yHK2k2deZT32mXAZol0j5pswPKxoTLXHl63egVJessVA5OYY
\r
31 ygj/wV/VWRztzxjFeV/70l8Efh0A9fGyT/i08=
\r
32 Received: by 10.223.99.153 with SMTP id u25mr11428950fan.112.1309883047597;
\r
33 Tue, 05 Jul 2011 09:24:07 -0700 (PDT)
\r
34 Received: from localhost (dslb-178-004-223-219.pools.arcor-ip.net
\r
36 by mx.google.com with ESMTPS id l9sm2287016fal.19.2011.07.05.09.24.05
\r
37 (version=TLSv1/SSLv3 cipher=OTHER);
\r
38 Tue, 05 Jul 2011 09:24:06 -0700 (PDT)
\r
39 From: Daniel Schoepe <daniel.schoepe@googlemail.com>
\r
40 To: notmuch@notmuchmail.org
\r
41 Subject: [PATCH v3 2/2] emacs: Tests for user-defined sections
\r
42 Date: Tue, 5 Jul 2011 18:23:50 +0200
\r
43 Message-Id: <1309883030-28899-3-git-send-email-daniel.schoepe@googlemail.com>
\r
44 X-Mailer: git-send-email 1.7.5.4
\r
45 In-Reply-To: <1309883030-28899-1-git-send-email-daniel.schoepe@googlemail.com>
\r
46 References: <1309379221-5617-1-git-send-email-daniel.schoepe@googlemail.com>
\r
47 <1309883030-28899-1-git-send-email-daniel.schoepe@googlemail.com>
\r
48 X-BeenThere: notmuch@notmuchmail.org
\r
49 X-Mailman-Version: 2.1.13
\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: Tue, 05 Jul 2011 16:24:10 -0000
\r
63 test/emacs | 37 ++++++++++++++++++++
\r
64 test/emacs.expected-output/notmuch-hello | 3 +-
\r
65 .../notmuch-hello-new-section | 4 ++
\r
66 .../notmuch-hello-no-saved-searches | 3 +-
\r
67 .../notmuch-hello-section-before | 18 +++++++++
\r
68 .../notmuch-hello-section-counts | 5 +++
\r
69 .../notmuch-hello-section-hidden-tag | 4 ++
\r
70 .../notmuch-hello-section-with-empty | 4 ++
\r
71 .../emacs.expected-output/notmuch-hello-with-empty | 3 +-
\r
72 9 files changed, 78 insertions(+), 3 deletions(-)
\r
73 create mode 100644 test/emacs.expected-output/notmuch-hello-new-section
\r
74 create mode 100644 test/emacs.expected-output/notmuch-hello-section-before
\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
79 diff --git a/test/emacs b/test/emacs
\r
80 index 53f455a..40e2563 100755
\r
83 @@ -34,6 +34,43 @@ test_emacs '(let ((notmuch-saved-searches
\r
85 test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-no-saved-searches
\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
93 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-new-section
\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
104 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-section-with-empty
\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
113 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-section-hidden-tag
\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 + :make-count \"tag:signed\")))))
\r
122 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-section-counts
\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 64b7e42..9666327 100644
\r
129 --- a/test/emacs.expected-output/notmuch-hello
\r
130 +++ b/test/emacs.expected-output/notmuch-hello
\r
131 @@ -6,9 +6,10 @@ Saved searches: [edit]
\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
143 diff --git a/test/emacs.expected-output/notmuch-hello-new-section b/test/emacs.expected-output/notmuch-hello-new-section
\r
144 new file mode 100644
\r
145 index 0000000..be7b26a
\r
147 +++ b/test/emacs.expected-output/notmuch-hello-new-section
\r
153 diff --git a/test/emacs.expected-output/notmuch-hello-no-saved-searches b/test/emacs.expected-output/notmuch-hello-no-saved-searches
\r
154 index 7f8206a..744a8f1 100644
\r
155 --- a/test/emacs.expected-output/notmuch-hello-no-saved-searches
\r
156 +++ b/test/emacs.expected-output/notmuch-hello-no-saved-searches
\r
164 Type a search query and hit RET to view matching threads.
\r
165 Edit saved searches with the `edit' button.
\r
166 Hit RET or click on a saved search or tag name to view matching threads.
\r
167 `=' refreshes this screen. `s' jumps to the search box. `q' to quit.
\r
169 diff --git a/test/emacs.expected-output/notmuch-hello-section-before b/test/emacs.expected-output/notmuch-hello-section-before
\r
170 new file mode 100644
\r
171 index 0000000..a5781ce
\r
173 +++ b/test/emacs.expected-output/notmuch-hello-section-before
\r
175 + Welcome to notmuch. You have 50 messages.
\r
177 +Saved searches: [edit]
\r
179 + 50 inbox 50 unread
\r
181 +Test-before [hide]
\r
183 + 4 attachment 7 signed
\r
184 + 50 inbox 50 unread
\r
189 + Type a search query and hit RET to view matching threads.
\r
190 + Edit saved searches with the `edit' button.
\r
191 + Hit RET or click on a saved search or tag name to view matching threads.
\r
192 + `=' refreshes this screen. `s' jumps to the search box. `q' to quit.
\r
193 diff --git a/test/emacs.expected-output/notmuch-hello-section-counts b/test/emacs.expected-output/notmuch-hello-section-counts
\r
194 new file mode 100644
\r
195 index 0000000..12d19ed
\r
197 +++ b/test/emacs.expected-output/notmuch-hello-section-counts
\r
199 +Test-with-counts: [hide]
\r
201 + 2 attachment 7 inbox 7 signed
\r
204 diff --git a/test/emacs.expected-output/notmuch-hello-section-hidden-tag b/test/emacs.expected-output/notmuch-hello-section-hidden-tag
\r
205 new file mode 100644
\r
206 index 0000000..eb21c07
\r
208 +++ b/test/emacs.expected-output/notmuch-hello-section-hidden-tag
\r
210 +Test-with-filtered: [hide]
\r
212 + 4 attachment 50 inbox 7 signed
\r
214 diff --git a/test/emacs.expected-output/notmuch-hello-section-with-empty b/test/emacs.expected-output/notmuch-hello-section-with-empty
\r
215 new file mode 100644
\r
216 index 0000000..c5b6623
\r
218 +++ b/test/emacs.expected-output/notmuch-hello-section-with-empty
\r
220 +Test-with-empty:[hide]
\r
224 diff --git a/test/emacs.expected-output/notmuch-hello-with-empty b/test/emacs.expected-output/notmuch-hello-with-empty
\r
225 index a9ed630..e9c8eb9 100644
\r
226 --- a/test/emacs.expected-output/notmuch-hello-with-empty
\r
227 +++ b/test/emacs.expected-output/notmuch-hello-with-empty
\r
228 @@ -6,9 +6,10 @@ Saved searches: [edit]
\r
235 Type a search query and hit RET to view matching threads.
\r
236 Edit saved searches with the `edit' button.
\r
237 Hit RET or click on a saved search or tag name to view matching threads.
\r
238 `=' refreshes this screen. `s' jumps to the search box. `q' to quit.
\r