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 DBCE042119C for ; Sun, 22 Jan 2012 20:24:50 -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 gibSbIiGg2UL for ; Sun, 22 Jan 2012 20:24:49 -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 F04D9421197 for ; Sun, 22 Jan 2012 20:24:48 -0800 (PST) Received: by wgbdt12 with SMTP id dt12so2215149wgb.2 for ; Sun, 22 Jan 2012 20:24:47 -0800 (PST) Received: by 10.180.82.41 with SMTP id f9mr10679689wiy.7.1327292687502; Sun, 22 Jan 2012 20:24:47 -0800 (PST) Received: from localhost ([109.131.95.182]) by mx.google.com with ESMTPS id df2sm10774066wib.4.2012.01.22.20.24.46 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 22 Jan 2012 20:24:47 -0800 (PST) From: Pieter Praet To: Austin Clements Subject: [PATCH v2 2/6] test: only exclude "deleted" messages from search if explicitly configured Date: Mon, 23 Jan 2012 05:22:33 +0100 Message-Id: <1327292557-7701-2-git-send-email-pieter@praet.org> X-Mailer: git-send-email 1.7.8.1 In-Reply-To: <87obtvaw8h.fsf@praet.org> References: <87obtvaw8h.fsf@praet.org> MIME-Version: 1.0 X-Gm-Message-State: ALoCoQlUjuhIKJulyz9GqDtMA07cIMgNUe/gthzhthTCE097i8YAPgXqQ+Aw5AYbVBaBzHm6/7e8 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: Mon, 23 Jan 2012 04:24:51 -0000 Currently, the 'search.exclude_tags' option is automatically set to "deleted;spam;" if it's missing from the config file. This violates the Principle of Least Surprise, so update the tests to *only* expect the exclusion of messages which are tagged "deleted" if the 'search.exclude_tags' option is explicitly set *and* contains that tag. --- 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