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 F25D5431FD7
\r
6 for <notmuch@notmuchmail.org>; Thu, 2 Feb 2012 09:43:03 -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 RN0zq4VaunHL for <notmuch@notmuchmail.org>;
\r
18 Thu, 2 Feb 2012 09:43:02 -0800 (PST)
\r
19 Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com
\r
20 [209.85.212.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 EC3DE431FBD
\r
23 for <notmuch@notmuchmail.org>; Thu, 2 Feb 2012 09:42:59 -0800 (PST)
\r
24 Received: by wibhi8 with SMTP id hi8so2134840wib.26
\r
25 for <notmuch@notmuchmail.org>; Thu, 02 Feb 2012 09:42:58 -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=LF87vPHlb9wPr/yCEHlxtfy6FDhijbN4YIVNE7ry1witvs9SubPT9oj+uaVotSyLH8
\r
30 sK75hbpTOJ6kjMi/2Ui6uJv4Wp1tfCXdMbBDhq4M5JI5phKzlv/qCP9WJhJL03Idj8mL
\r
31 bmDkzgztJRXmh3OTfItBiWqV8TuGvImZKscLk=
\r
32 Received: by 10.180.86.9 with SMTP id l9mr6177288wiz.15.1328204578775;
\r
33 Thu, 02 Feb 2012 09:42:58 -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 t15sm1132108wiv.6.2012.02.02.09.42.56 (version=TLSv1/SSLv3 cipher=OTHER);
\r
37 Thu, 02 Feb 2012 09:42:57 -0800 (PST)
\r
38 From: Mark Walters <markwalters1009@gmail.com>
\r
39 To: notmuch@notmuchmail.org,
\r
41 Subject: [PATCH v4 03/11] test: add tests for new cli --no-exclude option
\r
42 Date: Thu, 2 Feb 2012 17:43:31 +0000
\r
43 Message-Id: <1328204619-25046-3-git-send-email-markwalters1009@gmail.com>
\r
44 X-Mailer: git-send-email 1.7.2.3
\r
45 In-Reply-To: <874nv9rv79.fsf@qmul.ac.uk>
\r
46 References: <874nv9rv79.fsf@qmul.ac.uk>
\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: Thu, 02 Feb 2012 17:43:04 -0000
\r
61 The tests test the new --no-exclude option to search and count.
\r
62 There were no existing tests for the exclude behaviour for count so
\r
65 test/count | 21 +++++++++++++++++++++
\r
66 test/search | 5 +++++
\r
67 2 files changed, 26 insertions(+), 0 deletions(-)
\r
69 diff --git a/test/count b/test/count
\r
70 index 300b171..976fff1 100755
\r
73 @@ -37,4 +37,25 @@ test_expect_equal \
\r
75 "`notmuch count --output=threads ${SEARCH}`"
\r
77 +test_begin_subtest "count excluding \"deleted\" messages"
\r
78 +notmuch config set search.exclude_tags = deleted
\r
79 +generate_message '[subject]="Not deleted"'
\r
80 +generate_message '[subject]="Another not deleted"'
\r
81 +generate_message '[subject]="Deleted"'
\r
82 +notmuch new > /dev/null
\r
83 +notmuch tag +deleted id:$gen_msg_id
\r
84 +test_expect_equal \
\r
86 + "`notmuch count subject:deleted`"
\r
88 +test_begin_subtest "count \"deleted\" messages, exclude overridden"
\r
89 +test_expect_equal \
\r
91 + "`notmuch count subject:deleted and tag:deleted`"
\r
93 +test_begin_subtest "count \"deleted\" messages, with --no-exclude"
\r
94 +test_expect_equal \
\r
96 + "`notmuch count --no-exclude subject:deleted`"
\r
99 diff --git a/test/search b/test/search
\r
100 index 414be35..3da5d17 100755
\r
103 @@ -148,6 +148,11 @@ output=$(notmuch search subject:deleted | notmuch_search_sanitize)
\r
104 test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Not deleted (inbox unread)
\r
105 thread:XXX 2001-01-05 [1/2] Notmuch Test Suite; Not deleted reply (deleted inbox unread)"
\r
107 +test_begin_subtest "Don't exclude \"deleted\" messages when --no-exclude specified"
\r
108 +output=$(notmuch search --no-exclude subject:deleted | notmuch_search_sanitize)
\r
109 +test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Not deleted (inbox unread)
\r
110 +thread:XXX 2001-01-05 [2/2] Notmuch Test Suite; Deleted (deleted inbox unread)"
\r
112 test_begin_subtest "Don't exclude \"deleted\" messages from search if not configured"
\r
113 notmuch config set search.exclude_tags
\r
114 output=$(notmuch search subject:deleted | notmuch_search_sanitize)
\r