1 Return-Path: <novalazy@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 63228431FD4
\r
6 for <notmuch@notmuchmail.org>; Wed, 20 Jun 2012 06:29:53 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.799 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_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 pjEcBZ0aX5B6 for <notmuch@notmuchmail.org>;
\r
17 Wed, 20 Jun 2012 06:29:52 -0700 (PDT)
\r
18 Received: from mail-pz0-f53.google.com (mail-pz0-f53.google.com
\r
19 [209.85.210.53]) (using TLSv1 with cipher RC4-MD5 (128/128 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id 23528431E62
\r
22 for <notmuch@notmuchmail.org>; Wed, 20 Jun 2012 06:29:44 -0700 (PDT)
\r
23 Received: by mail-pz0-f53.google.com with SMTP id g9so12291942dad.26
\r
24 for <notmuch@notmuchmail.org>; Wed, 20 Jun 2012 06:29:44 -0700 (PDT)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
\r
26 h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;
\r
27 bh=ugCbcNrhd0NRMkn2/dDZ8tB/l8DIoaGbpCMPBj8XB/Y=;
\r
28 b=IHmy5IjufdPuzsWIHcbLlmUKGRX/b+gwDXSfKPSsCOhAx8JlxMQ/Gw2Zeh9AetCxh4
\r
29 yEdIC9K9xVZySofDBqja04q24K4r/cA1Q6xY9gqXm5aU61hEp6tTVFukmu421BNbykgC
\r
30 EgWrrCavH6+hBaRxqjyCOThl5U220slIchKU4ulxfk+sJ7KXwr32gJlcVRGXjTajoLoH
\r
31 T34FHA4FwrvkWvpr9LoO6SaTnMjNKapNATPMudyjsi2Mz4AKplhzNubhN0q5NfIxhFbY
\r
32 Spe4NAGA+jCFUR9TATATXAGbd3AXD2ZgiQ9d+kUYWvhrz/Nz5fbojWljyoWp4TIWm6Hg
\r
34 Received: by 10.68.224.225 with SMTP id rf1mr59819220pbc.55.1340198983902;
\r
35 Wed, 20 Jun 2012 06:29:43 -0700 (PDT)
\r
36 Received: from localhost (215.42.233.220.static.exetel.com.au.
\r
38 by mx.google.com with ESMTPS id ua6sm31943293pbc.20.2012.06.20.06.29.40
\r
39 (version=TLSv1/SSLv3 cipher=OTHER);
\r
40 Wed, 20 Jun 2012 06:29:42 -0700 (PDT)
\r
41 From: Peter Wang <novalazy@gmail.com>
\r
42 To: notmuch@notmuchmail.org
\r
43 Subject: [PATCH 3/8] test: add tests for search --exclude=all
\r
44 Date: Wed, 20 Jun 2012 23:29:02 +1000
\r
45 Message-Id: <1340198947-29370-4-git-send-email-novalazy@gmail.com>
\r
46 X-Mailer: git-send-email 1.7.4.4
\r
47 In-Reply-To: <1340198947-29370-1-git-send-email-novalazy@gmail.com>
\r
48 References: <1340198947-29370-1-git-send-email-novalazy@gmail.com>
\r
49 X-BeenThere: notmuch@notmuchmail.org
\r
50 X-Mailman-Version: 2.1.13
\r
52 List-Id: "Use and development of the notmuch mail system."
\r
53 <notmuch.notmuchmail.org>
\r
54 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
55 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
56 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
57 List-Post: <mailto:notmuch@notmuchmail.org>
\r
58 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
59 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
60 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
61 X-List-Received-Date: Wed, 20 Jun 2012 13:29:53 -0000
\r
63 Test the new search --exclude=all option.
\r
65 test/excludes | 22 ++++++++++++++++++++++
\r
66 1 files changed, 22 insertions(+), 0 deletions(-)
\r
68 diff --git a/test/excludes b/test/excludes
\r
69 index 24d653e..f1ae9ea 100755
\r
72 @@ -166,6 +166,16 @@ ${matching_message_ids[3]}
\r
73 ${matching_message_ids[4]}
\r
74 ${matching_message_ids[5]}"
\r
76 +test_begin_subtest "Search, exclude=all (thread summary)"
\r
77 +output=$(notmuch search --exclude=all tag:test | notmuch_search_sanitize)
\r
78 +test_expect_equal "$output" "thread:XXX 2001-01-05 [1/5] Notmuch Test Suite; Some messages excluded: single non-excluded match: reply 4 (inbox test unread)
\r
79 +thread:XXX 2001-01-05 [1/6] Notmuch Test Suite; No messages excluded: single match: reply 3 (inbox test unread)"
\r
81 +test_begin_subtest "Search, exclude=all (messages)"
\r
82 +output=$(notmuch search --exclude=all --output=messages tag:test | notmuch_search_sanitize)
\r
83 +test_expect_equal "$output" "${matching_message_ids[4]}
\r
84 +${matching_message_ids[5]}"
\r
86 test_begin_subtest "Search, default exclusion: tag in query (thread summary)"
\r
87 output=$(notmuch search tag:test and tag:deleted | notmuch_search_sanitize)
\r
88 test_expect_equal "$output" "thread:XXX 2001-01-05 [1/6] Notmuch Test Suite; All messages excluded: single match: reply 2 (deleted inbox test unread)
\r
89 @@ -218,6 +228,18 @@ ${matching_message_ids[1]}
\r
90 ${matching_message_ids[2]}
\r
91 ${matching_message_ids[3]}"
\r
93 +test_begin_subtest "Search, exclude=all: tag in query (thread summary)"
\r
94 +output=$(notmuch search --exclude=all tag:test and tag:deleted | notmuch_search_sanitize)
\r
95 +test_expect_equal "$output" "thread:XXX 2001-01-05 [1/6] Notmuch Test Suite; All messages excluded: single match: reply 2 (deleted inbox test unread)
\r
96 +thread:XXX 2001-01-05 [2/6] Notmuch Test Suite; All messages excluded: double match: reply 2 (deleted inbox test unread)
\r
97 +thread:XXX 2001-01-05 [1/6] Notmuch Test Suite; Some messages excluded: single excluded match: reply 3 (deleted inbox test unread)"
\r
99 +test_begin_subtest "Search, exclude=all: tag in query (messages)"
\r
100 +output=$(notmuch search --exclude=all --output=messages tag:test and tag:deleted | notmuch_search_sanitize)
\r
101 +test_expect_equal "$output" "${matching_message_ids[0]}
\r
102 +${matching_message_ids[1]}
\r
103 +${matching_message_ids[2]}
\r
104 +${matching_message_ids[3]}"
\r
106 #########################################################
\r
107 # Notmuch count tests
\r