From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 08752431FC9 for ; Thu, 19 Jan 2012 11:21:11 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PpGQaSw-uY5C for ; Thu, 19 Jan 2012 11:21:09 -0800 (PST) Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 6FAAD431FB6 for ; Thu, 19 Jan 2012 11:21:07 -0800 (PST) Received: by wgbdt12 with SMTP id dt12so292442wgb.2 for ; Thu, 19 Jan 2012 11:21:06 -0800 (PST) Received: by 10.180.19.168 with SMTP id g8mr46785634wie.4.1327000866194; Thu, 19 Jan 2012 11:21:06 -0800 (PST) Received: from localhost ([109.131.97.13]) by mx.google.com with ESMTPS id l8sm1022213wiy.5.2012.01.19.11.21.05 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 19 Jan 2012 11:21:05 -0800 (PST) From: Pieter Praet To: Austin Clements Subject: [PATCH 2/4] test: only exclude "deleted" messages from search if explicitly configured Date: Thu, 19 Jan 2012 20:19:02 +0100 Message-Id: <1327000744-25463-3-git-send-email-pieter@praet.org> X-Mailer: git-send-email 1.7.8.1 In-Reply-To: <1327000744-25463-1-git-send-email-pieter@praet.org> References: <1326586654-16840-3-git-send-email-amdragon@mit.edu> <1327000744-25463-1-git-send-email-pieter@praet.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Notmuch Mail X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jan 2012 19:21:11 -0000 If the 'search.exclude_tags' option is missing from the config file, its value is automatically set to "deleted;spam;". Taking PoLS/DWIM into account, this should probably only happen during setup. --- test/search | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/test/search b/test/search index bf965e7..99d94bd 100755 --- a/test/search +++ b/test/search @@ -130,6 +130,7 @@ output=$(notmuch search "bödý" | notmuch_search_sanitize) test_expect_equal "$output" "thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; utf8-message-body-subject (inbox unread)" test_begin_subtest "Exclude \"deleted\" messages from search" +notmuch config set search.exclude_tags = deleted generate_message '[subject]="Not deleted"' generate_message '[subject]="Deleted"' notmuch new > /dev/null @@ -147,4 +148,11 @@ output=$(notmuch search subject:deleted | notmuch_search_sanitize) test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Not deleted (inbox unread) thread:XXX 2001-01-05 [1/2] Notmuch Test Suite; Not deleted reply (deleted inbox unread)" +test_begin_subtest "Don't exclude \"deleted\" messages from search if not configured" +test_subtest_known_broken +notmuch config set search.exclude_tags +output=$(notmuch search subject:deleted | notmuch_search_sanitize) +test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Not deleted (inbox unread) +thread:XXX 2001-01-05 [2/2] Notmuch Test Suite; Deleted (deleted inbox unread)" + test_done -- 1.7.8.1