1 Return-Path: <markwalters1009@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 BBAC6431FAE
\r
6 for <notmuch@notmuchmail.org>; Thu, 1 Mar 2012 14:29:16 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0.201 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,
\r
14 RCVD_IN_DNSWL_LOW=-0.7] 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 y0HW9aCnV2Oa for <notmuch@notmuchmail.org>;
\r
18 Thu, 1 Mar 2012 14:29:16 -0800 (PST)
\r
19 Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com
\r
20 [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client
\r
21 certificate requested) by olra.theworths.org (Postfix) with ESMTPS id
\r
22 0CC2F431E64 for <notmuch@notmuchmail.org>; Thu, 1 Mar 2012 14:29:12 -0800
\r
24 Received: by mail-ww0-f45.google.com with SMTP id dt12so108365wgb.2
\r
25 for <notmuch@notmuchmail.org>; Thu, 01 Mar 2012 14:29:12 -0800 (PST)
\r
26 Received-SPF: pass (google.com: domain of markwalters1009@gmail.com designates
\r
27 10.180.101.228 as permitted sender) client-ip=10.180.101.228;
\r
28 Authentication-Results: mr.google.com; spf=pass (google.com: domain of
\r
29 markwalters1009@gmail.com designates 10.180.101.228 as
\r
30 permitted sender) smtp.mail=markwalters1009@gmail.com;
\r
31 dkim=pass header.i=markwalters1009@gmail.com
\r
32 Received: from mr.google.com ([10.180.101.228])
\r
33 by 10.180.101.228 with SMTP id fj4mr6555579wib.4.1330640952874
\r
34 (num_hops = 1); Thu, 01 Mar 2012 14:29:12 -0800 (PST)
\r
35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
\r
36 h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;
\r
37 bh=fN7XN3hi51DAGN4YfZOUofu3diawcjE5kNxzwiGd8sI=;
\r
38 b=mFLMpghc6LuJlz0Ik+QzC/GcDA6AsRs9aS10sXakAwcj3aBanViIEviDlYepYfPaBP
\r
39 6tFk1fC9GZL3upqEBAWjj9awi7o5TNN0PJDBbHmGz0iFh+6wE4Bm9gKE3l7ExIGBWAvm
\r
40 D2mOhen0LNbBWqcRcMZwlwVsSRUlu4eBc8rvQckEU7vysNjacOPYIznLMCzlkTNhMocI
\r
41 kh1KLwRuph8qDUhi/By0NW5T4rNIa0UT9tXcJQDMhrUfFwBaXiKEraNWVEzTtQ84Wd3c
\r
42 U3VwHGH8/XEBzRV/6s+o+/helGHkOkx0xisbWwejwdHRAlirP/Rtob6VKSEA3dp37mxe
\r
44 Received: by 10.180.101.228 with SMTP id fj4mr5292226wib.4.1330640952815;
\r
45 Thu, 01 Mar 2012 14:29:12 -0800 (PST)
\r
46 Received: from localhost (94-192-233-223.zone6.bethere.co.uk.
\r
47 [94.192.233.223]) by mx.google.com with ESMTPS id
\r
48 9sm16611870wid.2.2012.03.01.14.29.10 (version=TLSv1/SSLv3 cipher=OTHER); Thu,
\r
49 01 Mar 2012 14:29:11 -0800 (PST)
\r
50 From: Mark Walters <markwalters1009@gmail.com>
\r
51 To: notmuch@notmuchmail.org
\r
52 Subject: [Patch v7 03/13] test: add tests for new cli --no-exclude option
\r
53 Date: Thu, 1 Mar 2012 22:30:35 +0000
\r
54 Message-Id: <1330641045-27416-4-git-send-email-markwalters1009@gmail.com>
\r
55 X-Mailer: git-send-email 1.7.2.3
\r
56 In-Reply-To: <1330641045-27416-1-git-send-email-markwalters1009@gmail.com>
\r
57 References: <1330641045-27416-1-git-send-email-markwalters1009@gmail.com>
\r
58 X-BeenThere: notmuch@notmuchmail.org
\r
59 X-Mailman-Version: 2.1.13
\r
61 List-Id: "Use and development of the notmuch mail system."
\r
62 <notmuch.notmuchmail.org>
\r
63 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
64 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
65 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
66 List-Post: <mailto:notmuch@notmuchmail.org>
\r
67 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
68 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
69 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
70 X-List-Received-Date: Thu, 01 Mar 2012 22:29:17 -0000
\r
72 The tests test the new --no-exclude option to search and count.
\r
73 There were no existing tests for the exclude behaviour for count so
\r
76 test/count | 21 +++++++++++++++++++++
\r
77 test/search | 5 +++++
\r
78 2 files changed, 26 insertions(+), 0 deletions(-)
\r
80 diff --git a/test/count b/test/count
\r
81 index 300b171..976fff1 100755
\r
84 @@ -37,4 +37,25 @@ test_expect_equal \
\r
86 "`notmuch count --output=threads ${SEARCH}`"
\r
88 +test_begin_subtest "count excluding \"deleted\" messages"
\r
89 +notmuch config set search.exclude_tags = deleted
\r
90 +generate_message '[subject]="Not deleted"'
\r
91 +generate_message '[subject]="Another not deleted"'
\r
92 +generate_message '[subject]="Deleted"'
\r
93 +notmuch new > /dev/null
\r
94 +notmuch tag +deleted id:$gen_msg_id
\r
95 +test_expect_equal \
\r
97 + "`notmuch count subject:deleted`"
\r
99 +test_begin_subtest "count \"deleted\" messages, exclude overridden"
\r
100 +test_expect_equal \
\r
102 + "`notmuch count subject:deleted and tag:deleted`"
\r
104 +test_begin_subtest "count \"deleted\" messages, with --no-exclude"
\r
105 +test_expect_equal \
\r
107 + "`notmuch count --no-exclude subject:deleted`"
\r
110 diff --git a/test/search b/test/search
\r
111 index 414be35..3da5d17 100755
\r
114 @@ -148,6 +148,11 @@ output=$(notmuch search subject:deleted | notmuch_search_sanitize)
\r
115 test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Not deleted (inbox unread)
\r
116 thread:XXX 2001-01-05 [1/2] Notmuch Test Suite; Not deleted reply (deleted inbox unread)"
\r
118 +test_begin_subtest "Don't exclude \"deleted\" messages when --no-exclude specified"
\r
119 +output=$(notmuch search --no-exclude subject:deleted | notmuch_search_sanitize)
\r
120 +test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Not deleted (inbox unread)
\r
121 +thread:XXX 2001-01-05 [2/2] Notmuch Test Suite; Deleted (deleted inbox unread)"
\r
123 test_begin_subtest "Don't exclude \"deleted\" messages from search if not configured"
\r
124 notmuch config set search.exclude_tags
\r
125 output=$(notmuch search subject:deleted | notmuch_search_sanitize)
\r