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
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
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
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
62 From: Daniel Schoepe <daniel.schoepe@googlemail.com>
\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
79 diff --git a/test/emacs b/test/emacs
\r
80 index ac47b16..8b1d16c 100755
\r
83 @@ -29,6 +29,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 + :filter-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 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
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
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
148 +++ b/test/emacs.expected-output/notmuch-hello-new-section
\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
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
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
175 +++ b/test/emacs.expected-output/notmuch-hello-section-counts
\r
177 +Test-with-counts: [hide]
\r
179 + 2 attachment 7 signed
\r
180 + 7 inbox 7 unread
\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
186 +++ b/test/emacs.expected-output/notmuch-hello-section-hidden-tag
\r
188 +Test-with-filtered: [hide]
\r
190 + 4 attachment 52 inbox 7 signed
\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
196 +++ b/test/emacs.expected-output/notmuch-hello-section-with-empty
\r
198 +Test-with-empty: [hide]
\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
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