database error
[notmuch-archives.git] / 56 / 72b23c03102e822c7ced6de110b2ab732d816e
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 513D141ED7C\r
6         for <notmuch@notmuchmail.org>; Wed, 15 Feb 2012 01:03:13 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0.201\r
10 X-Spam-Level: \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 MYzuUbSl8HHL for <notmuch@notmuchmail.org>;\r
18         Wed, 15 Feb 2012 01:03:11 -0800 (PST)\r
19 Received: from mail-we0-f181.google.com (mail-we0-f181.google.com\r
20         [74.125.82.181]) (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 B5FCB421163\r
23         for <notmuch@notmuchmail.org>; Wed, 15 Feb 2012 01:02:59 -0800 (PST)\r
24 Received: by mail-we0-f181.google.com with SMTP id p13so603332wer.26\r
25         for <notmuch@notmuchmail.org>; Wed, 15 Feb 2012 01:02:59 -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=fN7XN3hi51DAGN4YfZOUofu3diawcjE5kNxzwiGd8sI=;\r
29         b=spHMO+5cW0Hz7S7HVF81GwRmLZtL6wT3eaXcO24ZzWtVd4lJbZFe7LlI52r7kYtV52\r
30         P6XhgwWevJWQyKLyoGdq8fBQWFJgjWEIWPVXCB6p3+5IezjasT3rwDe7Z16etAsCEmM6\r
31         XxUtvDUeZKMWgFyv6FaTGkT2mgWogfiTS7jgg=\r
32 Received: by 10.180.24.202 with SMTP id w10mr34037466wif.9.1329296579499;\r
33         Wed, 15 Feb 2012 01:02:59 -0800 (PST)\r
34 Received: from localhost (94-192-233-223.zone6.bethere.co.uk.\r
35  [94.192.233.223])      by mx.google.com with ESMTPS id\r
36  y6sm32086931wix.10.2012.02.15.01.02.57 (version=TLSv1/SSLv3 cipher=OTHER);\r
37         Wed, 15 Feb 2012 01:02:58 -0800 (PST)\r
38 From: Mark Walters <markwalters1009@gmail.com>\r
39 To: notmuch@notmuchmail.org\r
40 Subject: [RFC PATCH v5 03/11] test: add tests for new cli --no-exclude option\r
41 Date: Wed, 15 Feb 2012 09:03:31 +0000\r
42 Message-Id: <1329296619-7463-4-git-send-email-markwalters1009@gmail.com>\r
43 X-Mailer: git-send-email 1.7.2.3\r
44 In-Reply-To: <1329296619-7463-1-git-send-email-markwalters1009@gmail.com>\r
45 References: <1329296619-7463-1-git-send-email-markwalters1009@gmail.com>\r
46 X-BeenThere: notmuch@notmuchmail.org\r
47 X-Mailman-Version: 2.1.13\r
48 Precedence: list\r
49 List-Id: "Use and development of the notmuch mail system."\r
50         <notmuch.notmuchmail.org>\r
51 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
52         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
53 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
54 List-Post: <mailto:notmuch@notmuchmail.org>\r
55 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
56 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
57         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
58 X-List-Received-Date: Wed, 15 Feb 2012 09:03:13 -0000\r
59 \r
60 The tests test the new --no-exclude option to search and count.\r
61 There were no existing tests for the exclude behaviour for count so\r
62 added these too.\r
63 ---\r
64  test/count  |   21 +++++++++++++++++++++\r
65  test/search |    5 +++++\r
66  2 files changed, 26 insertions(+), 0 deletions(-)\r
67 \r
68 diff --git a/test/count b/test/count\r
69 index 300b171..976fff1 100755\r
70 --- a/test/count\r
71 +++ b/test/count\r
72 @@ -37,4 +37,25 @@ test_expect_equal \\r
73      "0" \\r
74      "`notmuch count --output=threads ${SEARCH}`"\r
75  \r
76 +test_begin_subtest "count excluding \"deleted\" messages"\r
77 +notmuch config set search.exclude_tags = deleted\r
78 +generate_message '[subject]="Not deleted"'\r
79 +generate_message '[subject]="Another not deleted"'\r
80 +generate_message '[subject]="Deleted"'\r
81 +notmuch new > /dev/null\r
82 +notmuch tag +deleted id:$gen_msg_id\r
83 +test_expect_equal \\r
84 +    "2" \\r
85 +    "`notmuch count subject:deleted`"\r
86 +\r
87 +test_begin_subtest "count \"deleted\" messages, exclude overridden"\r
88 +test_expect_equal \\r
89 +    "1" \\r
90 +    "`notmuch count subject:deleted and tag:deleted`"\r
91 +\r
92 +test_begin_subtest "count \"deleted\" messages, with --no-exclude"\r
93 +test_expect_equal \\r
94 +    "3" \\r
95 +    "`notmuch count --no-exclude subject:deleted`"\r
96 +\r
97  test_done\r
98 diff --git a/test/search b/test/search\r
99 index 414be35..3da5d17 100755\r
100 --- a/test/search\r
101 +++ b/test/search\r
102 @@ -148,6 +148,11 @@ output=$(notmuch search subject:deleted | notmuch_search_sanitize)\r
103  test_expect_equal "$output" "thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Not deleted (inbox unread)\r
104  thread:XXX   2001-01-05 [1/2] Notmuch Test Suite; Not deleted reply (deleted inbox unread)"\r
105  \r
106 +test_begin_subtest "Don't exclude \"deleted\" messages when --no-exclude specified"\r
107 +output=$(notmuch search --no-exclude subject:deleted | notmuch_search_sanitize)\r
108 +test_expect_equal "$output" "thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Not deleted (inbox unread)\r
109 +thread:XXX   2001-01-05 [2/2] Notmuch Test Suite; Deleted (deleted inbox unread)"\r
110 +\r
111  test_begin_subtest "Don't exclude \"deleted\" messages from search if not configured"\r
112  notmuch config set search.exclude_tags\r
113  output=$(notmuch search subject:deleted | notmuch_search_sanitize)\r
114 -- \r
115 1.7.2.3\r
116 \r