--- /dev/null
+Return-Path: <markwalters1009@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 E15E1431FD4\r
+ for <notmuch@notmuchmail.org>; Sat, 11 May 2013 12:50:28 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.201\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
+ tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+ FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
+ 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 0Q2eHS5Lsbft for <notmuch@notmuchmail.org>;\r
+ Sat, 11 May 2013 12:50:23 -0700 (PDT)\r
+Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com\r
+ [209.85.212.179]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 1C463431FBD\r
+ for <notmuch@notmuchmail.org>; Sat, 11 May 2013 12:50:22 -0700 (PDT)\r
+Received: by mail-wi0-f179.google.com with SMTP id hn3so1673567wib.0\r
+ for <notmuch@notmuchmail.org>; Sat, 11 May 2013 12:50:22 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+ h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to\r
+ :references; bh=g8ICB0MZY93PBn2/eh966KL14FPLMlSypZX0Kmlk+UY=;\r
+ b=M6tCG3XlG+cSkIxKj9abL4aXvxsrhEuC0h3L2vGPDrXXXT3q75NQAGADF9fAeJP3/S\r
+ rlNLaUAxt+OCBVPmPG7un7O1XoZWwwoTtKUqXdw/w/2Vo3kcMwg2yuiippIkWlxAowk0\r
+ 4UAzMsTZSeeoKdVnuRxp5W5Lg59SF3By3gyjDTo7+kpJuNDPvPNRgYy/ODtkSUMlXAe0\r
+ C4nWKXSoEPwpn7Nr5f8a4K07QTvDD9V+0MJ1esq9P394XOPjtvq1IXQ4R0eUdQc3uutm\r
+ UW+xIOvh+I5O6MyqB52baZ1S2/aeIkMLOqDgYxV4Nt0wYgy7qi0vOdGfw8u9cno/SNL/\r
+ gC1w==\r
+X-Received: by 10.180.212.3 with SMTP id ng3mr10393950wic.22.1368301822051;\r
+ Sat, 11 May 2013 12:50:22 -0700 (PDT)\r
+Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])\r
+ by mx.google.com with ESMTPSA id ed20sm6268472wic.0.2013.05.11.12.50.21\r
+ for <multiple recipients>\r
+ (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+ Sat, 11 May 2013 12:50:21 -0700 (PDT)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2 3/8] test: add tests for search --exclude=all\r
+Date: Sat, 11 May 2013 20:50:04 +0100\r
+Message-Id: <1368301809-12532-4-git-send-email-markwalters1009@gmail.com>\r
+X-Mailer: git-send-email 1.7.9.1\r
+In-Reply-To: <1368301809-12532-1-git-send-email-markwalters1009@gmail.com>\r
+References: <1368301809-12532-1-git-send-email-markwalters1009@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: Sat, 11 May 2013 19:50:29 -0000\r
+\r
+From: Peter Wang <novalazy@gmail.com>\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.9.1\r
+\r