[PATCH 3/8] test: add tests for search --exclude=all
authorPeter Wang <novalazy@gmail.com>
Wed, 20 Jun 2012 13:29:02 +0000 (23:29 +1000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:47:44 +0000 (09:47 -0800)
a5/3b4afe00ef5409e81be8e018a6b96ba2840d3f [new file with mode: 0644]

diff --git a/a5/3b4afe00ef5409e81be8e018a6b96ba2840d3f b/a5/3b4afe00ef5409e81be8e018a6b96ba2840d3f
new file mode 100644 (file)
index 0000000..2e86233
--- /dev/null
@@ -0,0 +1,110 @@
+Return-Path: <novalazy@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 63228431FD4\r
+       for <notmuch@notmuchmail.org>; Wed, 20 Jun 2012 06:29:53 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id pjEcBZ0aX5B6 for <notmuch@notmuchmail.org>;\r
+       Wed, 20 Jun 2012 06:29:52 -0700 (PDT)\r
+Received: from mail-pz0-f53.google.com (mail-pz0-f53.google.com\r
+       [209.85.210.53]) (using TLSv1 with cipher RC4-MD5 (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 23528431E62\r
+       for <notmuch@notmuchmail.org>; Wed, 20 Jun 2012 06:29:44 -0700 (PDT)\r
+Received: by mail-pz0-f53.google.com with SMTP id g9so12291942dad.26\r
+       for <notmuch@notmuchmail.org>; Wed, 20 Jun 2012 06:29:44 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+       h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
+       bh=ugCbcNrhd0NRMkn2/dDZ8tB/l8DIoaGbpCMPBj8XB/Y=;\r
+       b=IHmy5IjufdPuzsWIHcbLlmUKGRX/b+gwDXSfKPSsCOhAx8JlxMQ/Gw2Zeh9AetCxh4\r
+       yEdIC9K9xVZySofDBqja04q24K4r/cA1Q6xY9gqXm5aU61hEp6tTVFukmu421BNbykgC\r
+       EgWrrCavH6+hBaRxqjyCOThl5U220slIchKU4ulxfk+sJ7KXwr32gJlcVRGXjTajoLoH\r
+       T34FHA4FwrvkWvpr9LoO6SaTnMjNKapNATPMudyjsi2Mz4AKplhzNubhN0q5NfIxhFbY\r
+       Spe4NAGA+jCFUR9TATATXAGbd3AXD2ZgiQ9d+kUYWvhrz/Nz5fbojWljyoWp4TIWm6Hg\r
+       iweg==\r
+Received: by 10.68.224.225 with SMTP id rf1mr59819220pbc.55.1340198983902;\r
+       Wed, 20 Jun 2012 06:29:43 -0700 (PDT)\r
+Received: from localhost (215.42.233.220.static.exetel.com.au.\r
+       [220.233.42.215])\r
+       by mx.google.com with ESMTPS id ua6sm31943293pbc.20.2012.06.20.06.29.40\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Wed, 20 Jun 2012 06:29:42 -0700 (PDT)\r
+From: Peter Wang <novalazy@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 3/8] test: add tests for search --exclude=all\r
+Date: Wed, 20 Jun 2012 23:29:02 +1000\r
+Message-Id: <1340198947-29370-4-git-send-email-novalazy@gmail.com>\r
+X-Mailer: git-send-email 1.7.4.4\r
+In-Reply-To: <1340198947-29370-1-git-send-email-novalazy@gmail.com>\r
+References: <1340198947-29370-1-git-send-email-novalazy@gmail.com>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 20 Jun 2012 13:29:53 -0000\r
+\r
+Test the new search --exclude=all option.\r
+---\r
+ test/excludes |   22 ++++++++++++++++++++++\r
+ 1 files changed, 22 insertions(+), 0 deletions(-)\r
+\r
+diff --git a/test/excludes b/test/excludes\r
+index 24d653e..f1ae9ea 100755\r
+--- a/test/excludes\r
++++ b/test/excludes\r
+@@ -166,6 +166,16 @@ ${matching_message_ids[3]}\r
+ ${matching_message_ids[4]}\r
+ ${matching_message_ids[5]}"\r
+ \r
++test_begin_subtest "Search, exclude=all (thread summary)"\r
++output=$(notmuch search --exclude=all tag:test | notmuch_search_sanitize)\r
++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
++thread:XXX   2001-01-05 [1/6] Notmuch Test Suite; No messages excluded: single match: reply 3 (inbox test unread)"\r
++\r
++test_begin_subtest "Search, exclude=all (messages)"\r
++output=$(notmuch search --exclude=all --output=messages tag:test | notmuch_search_sanitize)\r
++test_expect_equal "$output" "${matching_message_ids[4]}\r
++${matching_message_ids[5]}"\r
++\r
+ test_begin_subtest "Search, default exclusion: tag in query (thread summary)"\r
+ output=$(notmuch search tag:test and tag:deleted | notmuch_search_sanitize)\r
+ 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
+@@ -218,6 +228,18 @@ ${matching_message_ids[1]}\r
+ ${matching_message_ids[2]}\r
+ ${matching_message_ids[3]}"\r
+ \r
++test_begin_subtest "Search, exclude=all: tag in query (thread summary)"\r
++output=$(notmuch search --exclude=all tag:test and tag:deleted | notmuch_search_sanitize)\r
++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
++thread:XXX   2001-01-05 [2/6] Notmuch Test Suite; All messages excluded: double match: reply 2 (deleted inbox test unread)\r
++thread:XXX   2001-01-05 [1/6] Notmuch Test Suite; Some messages excluded: single excluded match: reply 3 (deleted inbox test unread)"\r
++\r
++test_begin_subtest "Search, exclude=all: tag in query (messages)"\r
++output=$(notmuch search --exclude=all --output=messages tag:test and tag:deleted | notmuch_search_sanitize)\r
++test_expect_equal "$output" "${matching_message_ids[0]}\r
++${matching_message_ids[1]}\r
++${matching_message_ids[2]}\r
++${matching_message_ids[3]}"\r
+ \r
+ #########################################################\r
+ # Notmuch count tests\r
+-- \r
+1.7.4.4\r
+\r