1 Return-Path: <pieter@praet.org>
\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 DBCE042119C
\r
6 for <notmuch@notmuchmail.org>; Sun, 22 Jan 2012 20:24:50 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id gibSbIiGg2UL for <notmuch@notmuchmail.org>;
\r
16 Sun, 22 Jan 2012 20:24:49 -0800 (PST)
\r
17 Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com
\r
18 [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client
\r
19 certificate requested) by olra.theworths.org (Postfix) with ESMTPS id
\r
20 F04D9421197 for <notmuch@notmuchmail.org>; Sun, 22 Jan 2012 20:24:48 -0800
\r
22 Received: by wgbdt12 with SMTP id dt12so2215149wgb.2
\r
23 for <notmuch@notmuchmail.org>; Sun, 22 Jan 2012 20:24:47 -0800 (PST)
\r
24 Received: by 10.180.82.41 with SMTP id f9mr10679689wiy.7.1327292687502;
\r
25 Sun, 22 Jan 2012 20:24:47 -0800 (PST)
\r
26 Received: from localhost ([109.131.95.182])
\r
27 by mx.google.com with ESMTPS id df2sm10774066wib.4.2012.01.22.20.24.46
\r
28 (version=TLSv1/SSLv3 cipher=OTHER);
\r
29 Sun, 22 Jan 2012 20:24:47 -0800 (PST)
\r
30 From: Pieter Praet <pieter@praet.org>
\r
31 To: Austin Clements <amdragon@mit.edu>
\r
32 Subject: [PATCH v2 2/6] test: only exclude "deleted" messages from search if explicitly configured
\r
33 Date: Mon, 23 Jan 2012 05:22:33 +0100
\r
34 Message-Id: <1327292557-7701-2-git-send-email-pieter@praet.org>
\r
35 X-Mailer: git-send-email 1.7.8.1
\r
36 In-Reply-To: <87obtvaw8h.fsf@praet.org>
\r
37 References: <87obtvaw8h.fsf@praet.org>
\r
40 ALoCoQlUjuhIKJulyz9GqDtMA07cIMgNUe/gthzhthTCE097i8YAPgXqQ+Aw5AYbVBaBzHm6/7e8
\r
41 Content-Type: text/plain; charset=UTF-8
\r
42 Content-Transfer-Encoding: 8bit
\r
43 Cc: Notmuch Mail <notmuch@notmuchmail.org>
\r
44 X-BeenThere: notmuch@notmuchmail.org
\r
45 X-Mailman-Version: 2.1.13
\r
47 List-Id: "Use and development of the notmuch mail system."
\r
48 <notmuch.notmuchmail.org>
\r
49 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
50 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
51 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
52 List-Post: <mailto:notmuch@notmuchmail.org>
\r
53 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
54 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
55 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
56 X-List-Received-Date: Mon, 23 Jan 2012 04:24:51 -0000
\r
58 Currently, the 'search.exclude_tags' option is automatically set to
\r
59 "deleted;spam;" if it's missing from the config file.
\r
61 This violates the Principle of Least Surprise, so update the tests to
\r
62 *only* expect the exclusion of messages which are tagged "deleted" if the
\r
63 'search.exclude_tags' option is explicitly set *and* contains that tag.
\r
65 test/search | 8 ++++++++
\r
66 1 files changed, 8 insertions(+), 0 deletions(-)
\r
68 diff --git a/test/search b/test/search
\r
69 index bf965e7..99d94bd 100755
\r
72 @@ -130,6 +130,7 @@ output=$(notmuch search "bödý" | notmuch_search_sanitize)
\r
73 test_expect_equal "$output" "thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; utf8-message-body-subject (inbox unread)"
\r
75 test_begin_subtest "Exclude \"deleted\" messages from search"
\r
76 +notmuch config set search.exclude_tags = deleted
\r
77 generate_message '[subject]="Not deleted"'
\r
78 generate_message '[subject]="Deleted"'
\r
79 notmuch new > /dev/null
\r
80 @@ -147,4 +148,11 @@ output=$(notmuch search subject:deleted | notmuch_search_sanitize)
\r
81 test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Not deleted (inbox unread)
\r
82 thread:XXX 2001-01-05 [1/2] Notmuch Test Suite; Not deleted reply (deleted inbox unread)"
\r
84 +test_begin_subtest "Don't exclude \"deleted\" messages from search if not configured"
\r
85 +test_subtest_known_broken
\r
86 +notmuch config set search.exclude_tags
\r
87 +output=$(notmuch search subject:deleted | notmuch_search_sanitize)
\r
88 +test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Not deleted (inbox unread)
\r
89 +thread:XXX 2001-01-05 [2/2] Notmuch Test Suite; Deleted (deleted inbox unread)"
\r