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 B41DD429E33
\r
6 for <notmuch@notmuchmail.org>; Mon, 10 Oct 2011 06:40:00 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\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 YYlWUELvlk7I for <notmuch@notmuchmail.org>;
\r
17 Mon, 10 Oct 2011 06:39:58 -0700 (PDT)
\r
18 Received: from mail-yx0-f181.google.com (mail-yx0-f181.google.com
\r
19 [209.85.213.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 1D3FB429E3B
\r
22 for <notmuch@notmuchmail.org>; Mon, 10 Oct 2011 06:39:56 -0700 (PDT)
\r
23 Received: by mail-yx0-f181.google.com with SMTP id 30so7315581yxk.26
\r
24 for <notmuch@notmuchmail.org>; Mon, 10 Oct 2011 06:39:55 -0700 (PDT)
\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=tsNCKewgGJxphlv+cZTrN6jsE8KSlXJwKjVu71T3BE8=;
\r
28 b=DQyoIXdsKfh0nzp56q232HWM2wXAl2Iq/jCjGjt2a2XbOjfFyO0nPbnFMOc5RCyUuj
\r
29 rjMwjiQJJbu8c0MbxAd8cYOPtVTP8MNdfULmYhxiZTMA+E3qRu1e3KI7WO1OV2koAXHM
\r
30 zkx6jPdU9kVdJKy+hq6OJGXFuoUffjD9WttgU=
\r
31 Received: by 10.223.61.146 with SMTP id t18mr32463366fah.34.1318253995524;
\r
32 Mon, 10 Oct 2011 06:39:55 -0700 (PDT)
\r
33 Received: from localhost (p4FC790FC.dip0.t-ipconnect.de. [79.199.144.252])
\r
34 by mx.google.com with ESMTPS id k26sm31676529fab.12.2011.10.10.06.39.53
\r
35 (version=TLSv1/SSLv3 cipher=OTHER);
\r
36 Mon, 10 Oct 2011 06:39:54 -0700 (PDT)
\r
37 From: Daniel Schoepe <daniel@schoepe.org>
\r
38 To: notmuch@notmuchmail.org
\r
39 Subject: [PATCH v6 2/2] emacs: Tests for user-defined sections
\r
40 Date: Mon, 10 Oct 2011 15:39:42 +0200
\r
41 Message-Id: <1318253982-23588-3-git-send-email-daniel@schoepe.org>
\r
42 X-Mailer: git-send-email 1.7.6.3
\r
43 In-Reply-To: <1318253982-23588-1-git-send-email-daniel@schoepe.org>
\r
44 References: <87ippzysmv.fsf@steelpick.2x.cz>
\r
45 <1318253982-23588-1-git-send-email-daniel@schoepe.org>
\r
46 Cc: Daniel Schoepe <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: Mon, 10 Oct 2011 13:40:01 -0000
\r
61 From: Daniel Schoepe <daniel.schoepe@googlemail.com>
\r
64 test/emacs | 37 ++++++++++++++++++++
\r
65 test/emacs.expected-output/notmuch-hello | 4 ++-
\r
66 .../notmuch-hello-new-section | 4 ++
\r
67 .../notmuch-hello-no-saved-searches | 4 ++-
\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 | 4 ++-
\r
72 8 files changed, 63 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-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 0303d7d..15854ae 100755
\r
82 @@ -29,6 +29,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-searches
\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-searches
\r
97 + \"Test-with-empty\"
\r
98 + '((\"inbox\" . \"tag:inbox\")
\r
99 + (\"doesnotexist\" . \"tag:doesnotexist\"))
\r
100 + :hide-empty-searches 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 + \"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 + \"Test-with-counts\"
\r
118 + :filter-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..fd512d3 100644
\r
128 --- a/test/emacs.expected-output/notmuch-hello
\r
129 +++ b/test/emacs.expected-output/notmuch-hello
\r
130 @@ -6,9 +6,11 @@ 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
141 + Customize this page.
\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..37b2303 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
168 + Customize this page.
\r
170 diff --git a/test/emacs.expected-output/notmuch-hello-section-counts b/test/emacs.expected-output/notmuch-hello-section-counts
\r
171 new file mode 100644
\r
172 index 0000000..12d19ed
\r
174 +++ b/test/emacs.expected-output/notmuch-hello-section-counts
\r
176 +Test-with-counts: [hide]
\r
178 + 2 attachment 7 inbox 7 signed
\r
181 diff --git a/test/emacs.expected-output/notmuch-hello-section-hidden-tag b/test/emacs.expected-output/notmuch-hello-section-hidden-tag
\r
182 new file mode 100644
\r
183 index 0000000..eb21c07
\r
185 +++ b/test/emacs.expected-output/notmuch-hello-section-hidden-tag
\r
187 +Test-with-filtered: [hide]
\r
189 + 4 attachment 50 inbox 7 signed
\r
191 diff --git a/test/emacs.expected-output/notmuch-hello-section-with-empty b/test/emacs.expected-output/notmuch-hello-section-with-empty
\r
192 new file mode 100644
\r
193 index 0000000..4481dca
\r
195 +++ b/test/emacs.expected-output/notmuch-hello-section-with-empty
\r
197 +Test-with-empty: [hide]
\r
201 diff --git a/test/emacs.expected-output/notmuch-hello-with-empty b/test/emacs.expected-output/notmuch-hello-with-empty
\r
202 index a9ed630..220fac4 100644
\r
203 --- a/test/emacs.expected-output/notmuch-hello-with-empty
\r
204 +++ b/test/emacs.expected-output/notmuch-hello-with-empty
\r
205 @@ -6,9 +6,11 @@ Saved searches: [edit]
\r
212 Type a search query and hit RET to view matching threads.
\r
213 Edit saved searches with the `edit' button.
\r
214 Hit RET or click on a saved search or tag name to view matching threads.
\r
215 `=' refreshes this screen. `s' jumps to the search box. `q' to quit.
\r
216 + Customize this page.
\r