From 6dca29b5263fe7a16d31dbbe7ca231edeb750a11 Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Mon, 12 Mar 2012 11:31:53 +0000 Subject: [PATCH] [PATCH 1/2] test: add tests for message only search --- 56/f352f8c50eb37b8aa439d7cec70bfd9b509a25 | 100 ++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 56/f352f8c50eb37b8aa439d7cec70bfd9b509a25 diff --git a/56/f352f8c50eb37b8aa439d7cec70bfd9b509a25 b/56/f352f8c50eb37b8aa439d7cec70bfd9b509a25 new file mode 100644 index 000000000..f18e32cdc --- /dev/null +++ b/56/f352f8c50eb37b8aa439d7cec70bfd9b509a25 @@ -0,0 +1,100 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id ABFC1431FC2 + for ; Mon, 12 Mar 2012 04:32:01 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0.201 +X-Spam-Level: +X-Spam-Status: No, score=0.201 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001, + 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 V3S0Azo6zs3t for ; + Mon, 12 Mar 2012 04:32:01 -0700 (PDT) +Received: from mail-we0-f181.google.com (mail-we0-f181.google.com + [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 12846431FAF + for ; Mon, 12 Mar 2012 04:32:00 -0700 (PDT) +Received: by werm13 with SMTP id m13so3639546wer.26 + for ; Mon, 12 Mar 2012 04:31:59 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; + bh=2I3wOw4hg00YgDAE+2CQ4mJZ2kAkaBH/IoYUfNaRsqc=; + b=cdeNiTFTZfMhw2wlgtm3NakcLlVn5j7DcHHog4xHN2rgBKlkOXY0J0E4INxEDtfjHc + QJlCqtre5wPp073bBlC4syOUP0EWJcNhPXIWSQSxU82PnyHT+pHF+uYEQ2pJlz4aA2OA + r/fGlTEfERwxX/w947sXp00KsWTZMUbWGENGX4jf1WW/n54Ig5pmYZO2DTIF6q/nHcD/ + +D0K3Ww8Ptva1O8lqKJiic1rBonGaAvIhmPuNSFJT8Mbdbw3UehH+P/wA2WLlgCcI5xT + ixMCxLvip2VeGW+McIZtXsVfkq05KN0ysYh6339KHg/ba83ZQxydyzmtexDpxATP5Jgf + Wszw== +Received: by 10.216.135.206 with SMTP id u56mr7114586wei.29.1331551919901; + Mon, 12 Mar 2012 04:31:59 -0700 (PDT) +Received: from localhost (94-192-233-223.zone6.bethere.co.uk. + [94.192.233.223]) by mx.google.com with ESMTPS id + 9sm57004882wid.2.2012.03.12.04.31.58 (version=TLSv1/SSLv3 cipher=OTHER); Mon, + 12 Mar 2012 04:31:59 -0700 (PDT) +From: Mark Walters +To: notmuch@notmuchmail.org +Subject: [PATCH 1/2] test: add tests for message only search +Date: Mon, 12 Mar 2012 11:31:53 +0000 +Message-Id: <1331551914-28323-2-git-send-email-markwalters1009@gmail.com> +X-Mailer: git-send-email 1.7.9.1 +In-Reply-To: <1331551914-28323-1-git-send-email-markwalters1009@gmail.com> +References: <1331551914-28323-1-git-send-email-markwalters1009@gmail.com> +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, 12 Mar 2012 11:32:01 -0000 + +This adds two tests for --output=messages searches one of which fails +in some configurations. +--- + test/search | 11 +++++++++++ + 1 files changed, 11 insertions(+), 0 deletions(-) + +diff --git a/test/search b/test/search +index 081f60c..276271b 100755 +--- a/test/search ++++ b/test/search +@@ -132,13 +132,24 @@ test_expect_equal "$output" "thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; u + test_begin_subtest "Exclude \"deleted\" messages from search" + notmuch config set search.exclude_tags = deleted + generate_message '[subject]="Not deleted"' ++not_deleted_id=$gen_msg_id + generate_message '[subject]="Deleted"' + notmuch new > /dev/null + notmuch tag +deleted id:$gen_msg_id ++deleted_id=$gen_msg_id + 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 [0/1] Notmuch Test Suite; Deleted (deleted inbox unread)" + ++test_begin_subtest "Exclude \"deleted\" messages from message search" ++output=$(notmuch search --output=messages subject:deleted | notmuch_search_sanitize) ++test_expect_equal "$output" "id:$not_deleted_id" ++ ++test_begin_subtest "Exclude \"deleted\" messages from message search (no-exclude)" ++output=$(notmuch search --no-exclude --output=messages subject:deleted | notmuch_search_sanitize) ++test_expect_equal "$output" "id:$not_deleted_id ++id:$deleted_id" ++ + test_begin_subtest "Exclude \"deleted\" messages from search, overridden" + output=$(notmuch search subject:deleted and tag:deleted | notmuch_search_sanitize) + test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Deleted (deleted inbox unread)" +-- +1.7.9.1 + -- 2.26.2