1 Return-Path: <dmitry.kurochkin@gmail.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 47804429E50
\r
6 for <notmuch@notmuchmail.org>; Thu, 16 Feb 2012 23:49:43 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=1.061 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_BL_SPAMCOP_NET=1.246,
\r
14 RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_SORBS_WEB=0.614] autolearn=disabled
\r
15 Received: from olra.theworths.org ([127.0.0.1])
\r
16 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
17 with ESMTP id jVE4lC2aqV04 for <notmuch@notmuchmail.org>;
\r
18 Thu, 16 Feb 2012 23:49:41 -0800 (PST)
\r
19 Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com
\r
20 [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
21 (No client certificate requested)
\r
22 by olra.theworths.org (Postfix) with ESMTPS id D6313429E49
\r
23 for <notmuch@notmuchmail.org>; Thu, 16 Feb 2012 23:49:36 -0800 (PST)
\r
24 Received: by mail-bk0-f53.google.com with SMTP id it16so3104161bkc.26
\r
25 for <notmuch@notmuchmail.org>; Thu, 16 Feb 2012 23:49:36 -0800 (PST)
\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
\r
27 h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;
\r
28 bh=LxQlRBDe/lO9TI1FmdmvnCqydzCuWjNqrSIjM6OCMZM=;
\r
29 b=yHtpDgHMMLl4zzrm3oYyVxH2EtHKGO5VhdKfdmaDJQDkefEjwNUWzWJ4V5gbYA5FaA
\r
30 /DgRVdxIaMuBsGOSvMdihSonSHd8xHsg8RNiEFObpZb11M0stPZko4a1ZFweM0KZ7UEX
\r
31 GrHwmaIztPLA0vBEnz133VIW3IMSNXXPuZUvA=
\r
32 Received: by 10.204.130.150 with SMTP id t22mr3708841bks.1.1329464976481;
\r
33 Thu, 16 Feb 2012 23:49:36 -0800 (PST)
\r
34 Received: from localhost ([217.26.0.107])
\r
35 by mx.google.com with ESMTPS id ut6sm21109092bkb.14.2012.02.16.23.49.33
\r
36 (version=TLSv1/SSLv3 cipher=OTHER);
\r
37 Thu, 16 Feb 2012 23:49:34 -0800 (PST)
\r
38 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
\r
39 To: notmuch@notmuchmail.org
\r
40 Subject: [PATCH v9 2/2] emacs: Tests for user-defined sections
\r
41 Date: Fri, 17 Feb 2012 11:48:03 +0400
\r
42 Message-Id: <1329464884-1653-3-git-send-email-dmitry.kurochkin@gmail.com>
\r
43 X-Mailer: git-send-email 1.7.9
\r
44 In-Reply-To: <1329464884-1653-1-git-send-email-dmitry.kurochkin@gmail.com>
\r
45 References: <1310079227-19120-1-git-send-email-daniel.schoepe@googlemail.com>
\r
46 <1329464884-1653-1-git-send-email-dmitry.kurochkin@gmail.com>
\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: Fri, 17 Feb 2012 07:49:43 -0000
\r
62 From: Daniel Schoepe <daniel.schoepe@googlemail.com>
\r
64 A new file was added for notmuch-hello tests.
\r
66 test/emacs-hello | 47 ++++++++++++++++++++
\r
67 test/emacs.expected-output/notmuch-hello | 3 +-
\r
68 .../notmuch-hello-new-section | 4 ++
\r
69 .../notmuch-hello-no-saved-searches | 3 +-
\r
70 .../notmuch-hello-section-counts | 5 ++
\r
71 .../notmuch-hello-section-hidden-tag | 4 ++
\r
72 .../notmuch-hello-section-with-empty | 4 ++
\r
73 .../emacs.expected-output/notmuch-hello-with-empty | 3 +-
\r
74 test/notmuch-test | 1 +
\r
75 9 files changed, 71 insertions(+), 3 deletions(-)
\r
76 create mode 100755 test/emacs-hello
\r
77 create mode 100644 test/emacs.expected-output/notmuch-hello-new-section
\r
78 create mode 100644 test/emacs.expected-output/notmuch-hello-section-counts
\r
79 create mode 100644 test/emacs.expected-output/notmuch-hello-section-hidden-tag
\r
80 create mode 100644 test/emacs.expected-output/notmuch-hello-section-with-empty
\r
82 diff --git a/test/emacs-hello b/test/emacs-hello
\r
83 new file mode 100755
\r
84 index 0000000..b235e3a
\r
86 +++ b/test/emacs-hello
\r
88 +#!/usr/bin/env bash
\r
90 +test_description="Testing emacs notmuch-hello view"
\r
93 +EXPECTED=$TEST_DIRECTORY/emacs.expected-output
\r
97 +test_begin_subtest "User-defined section with inbox tag"
\r
98 +test_emacs "(let ((notmuch-hello-sections
\r
99 + (list (lambda () (notmuch-hello-insert-searches
\r
100 + \"Test\" '((\"inbox\" . \"tag:inbox\")))))))
\r
103 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-new-section
\r
105 +test_begin_subtest "User-defined section with empty, hidden entry"
\r
106 +test_emacs "(let ((notmuch-hello-sections
\r
107 + (list (lambda () (notmuch-hello-insert-searches
\r
108 + \"Test-with-empty\"
\r
109 + '((\"inbox\" . \"tag:inbox\")
\r
110 + (\"doesnotexist\" . \"tag:doesnotexist\"))
\r
111 + :hide-empty-searches t)))))
\r
114 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-section-with-empty
\r
116 +test_begin_subtest "User-defined section, unread tag filtered out"
\r
117 +test_emacs "(let ((notmuch-hello-sections
\r
118 + (list (lambda () (notmuch-hello-insert-tags-section
\r
119 + \"Test-with-filtered\"
\r
120 + :hide-tags '(\"unread\"))))))
\r
123 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-section-hidden-tag
\r
125 +test_begin_subtest "User-defined section, different query for counts"
\r
126 +test_emacs "(let ((notmuch-hello-sections
\r
127 + (list (lambda () (notmuch-hello-insert-tags-section
\r
128 + \"Test-with-counts\"
\r
129 + :filter-count \"tag:signed\")))))
\r
132 +test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-section-counts
\r
135 diff --git a/test/emacs.expected-output/notmuch-hello b/test/emacs.expected-output/notmuch-hello
\r
136 index 3e59595..1470790 100644
\r
137 --- a/test/emacs.expected-output/notmuch-hello
\r
138 +++ b/test/emacs.expected-output/notmuch-hello
\r
139 @@ -6,9 +6,10 @@ Saved searches: [edit]
\r
146 Type a search query and hit RET to view matching threads.
\r
147 Edit saved searches with the `edit' button.
\r
148 Hit RET or click on a saved search or tag name to view matching threads.
\r
149 `=' to refresh this screen. `s' to search messages. `q' to quit.
\r
150 + Customize this page.
\r
151 diff --git a/test/emacs.expected-output/notmuch-hello-new-section b/test/emacs.expected-output/notmuch-hello-new-section
\r
152 new file mode 100644
\r
153 index 0000000..c64d712
\r
155 +++ b/test/emacs.expected-output/notmuch-hello-new-section
\r
161 diff --git a/test/emacs.expected-output/notmuch-hello-no-saved-searches b/test/emacs.expected-output/notmuch-hello-no-saved-searches
\r
162 index ef0e5d0..05475b1 100644
\r
163 --- a/test/emacs.expected-output/notmuch-hello-no-saved-searches
\r
164 +++ b/test/emacs.expected-output/notmuch-hello-no-saved-searches
\r
172 Type a search query and hit RET to view matching threads.
\r
173 Edit saved searches with the `edit' button.
\r
174 Hit RET or click on a saved search or tag name to view matching threads.
\r
175 `=' to refresh this screen. `s' to search messages. `q' to quit.
\r
176 + Customize this page.
\r
177 diff --git a/test/emacs.expected-output/notmuch-hello-section-counts b/test/emacs.expected-output/notmuch-hello-section-counts
\r
178 new file mode 100644
\r
179 index 0000000..9d79659
\r
181 +++ b/test/emacs.expected-output/notmuch-hello-section-counts
\r
183 +Test-with-counts: [hide]
\r
185 + 2 attachment 7 signed
\r
186 + 7 inbox 7 unread
\r
188 diff --git a/test/emacs.expected-output/notmuch-hello-section-hidden-tag b/test/emacs.expected-output/notmuch-hello-section-hidden-tag
\r
189 new file mode 100644
\r
190 index 0000000..3688e7c
\r
192 +++ b/test/emacs.expected-output/notmuch-hello-section-hidden-tag
\r
194 +Test-with-filtered: [hide]
\r
196 + 4 attachment 52 inbox 7 signed
\r
198 diff --git a/test/emacs.expected-output/notmuch-hello-section-with-empty b/test/emacs.expected-output/notmuch-hello-section-with-empty
\r
199 new file mode 100644
\r
200 index 0000000..8209fed
\r
202 +++ b/test/emacs.expected-output/notmuch-hello-section-with-empty
\r
204 +Test-with-empty: [hide]
\r
208 diff --git a/test/emacs.expected-output/notmuch-hello-with-empty b/test/emacs.expected-output/notmuch-hello-with-empty
\r
209 index 71edba7..5e53222 100644
\r
210 --- a/test/emacs.expected-output/notmuch-hello-with-empty
\r
211 +++ b/test/emacs.expected-output/notmuch-hello-with-empty
\r
212 @@ -6,9 +6,10 @@ Saved searches: [edit]
\r
219 Type a search query and hit RET to view matching threads.
\r
220 Edit saved searches with the `edit' button.
\r
221 Hit RET or click on a saved search or tag name to view matching threads.
\r
222 `=' to refresh this screen. `s' to search messages. `q' to quit.
\r
223 + Customize this page.
\r
224 diff --git a/test/notmuch-test b/test/notmuch-test
\r
225 index e14d34e..f03b594 100755
\r
226 --- a/test/notmuch-test
\r
227 +++ b/test/notmuch-test
\r
228 @@ -54,6 +54,7 @@ TESTS="
\r
230 emacs-test-functions
\r
231 emacs-address-cleaning
\r
235 TESTS=${NOTMUCH_TESTS:=$TESTS}
\r