From: Mark Walters Date: Sat, 11 May 2013 19:50:04 +0000 (+0100) Subject: [PATCH v2 3/8] test: add tests for search --exclude=all X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=542a5d3563255e26330ca67289b2d0337d9c6f54;p=notmuch-archives.git [PATCH v2 3/8] test: add tests for search --exclude=all --- diff --git a/95/634618b808f7b56edb9824ee4a28a05c084368 b/95/634618b808f7b56edb9824ee4a28a05c084368 new file mode 100644 index 000000000..f28f0af68 --- /dev/null +++ b/95/634618b808f7b56edb9824ee4a28a05c084368 @@ -0,0 +1,113 @@ +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 E15E1431FD4 + for ; Sat, 11 May 2013 12:50:28 -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 0Q2eHS5Lsbft for ; + Sat, 11 May 2013 12:50:23 -0700 (PDT) +Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com + [209.85.212.179]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 1C463431FBD + for ; Sat, 11 May 2013 12:50:22 -0700 (PDT) +Received: by mail-wi0-f179.google.com with SMTP id hn3so1673567wib.0 + for ; Sat, 11 May 2013 12:50:22 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to + :references; bh=g8ICB0MZY93PBn2/eh966KL14FPLMlSypZX0Kmlk+UY=; + b=M6tCG3XlG+cSkIxKj9abL4aXvxsrhEuC0h3L2vGPDrXXXT3q75NQAGADF9fAeJP3/S + rlNLaUAxt+OCBVPmPG7un7O1XoZWwwoTtKUqXdw/w/2Vo3kcMwg2yuiippIkWlxAowk0 + 4UAzMsTZSeeoKdVnuRxp5W5Lg59SF3By3gyjDTo7+kpJuNDPvPNRgYy/ODtkSUMlXAe0 + C4nWKXSoEPwpn7Nr5f8a4K07QTvDD9V+0MJ1esq9P394XOPjtvq1IXQ4R0eUdQc3uutm + UW+xIOvh+I5O6MyqB52baZ1S2/aeIkMLOqDgYxV4Nt0wYgy7qi0vOdGfw8u9cno/SNL/ + gC1w== +X-Received: by 10.180.212.3 with SMTP id ng3mr10393950wic.22.1368301822051; + Sat, 11 May 2013 12:50:22 -0700 (PDT) +Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31]) + by mx.google.com with ESMTPSA id ed20sm6268472wic.0.2013.05.11.12.50.21 + for + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Sat, 11 May 2013 12:50:21 -0700 (PDT) +From: Mark Walters +To: notmuch@notmuchmail.org +Subject: [PATCH v2 3/8] test: add tests for search --exclude=all +Date: Sat, 11 May 2013 20:50:04 +0100 +Message-Id: <1368301809-12532-4-git-send-email-markwalters1009@gmail.com> +X-Mailer: git-send-email 1.7.9.1 +In-Reply-To: <1368301809-12532-1-git-send-email-markwalters1009@gmail.com> +References: <1368301809-12532-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: Sat, 11 May 2013 19:50:29 -0000 + +From: Peter Wang + +Test the new search --exclude=all option. +--- + test/excludes | 22 ++++++++++++++++++++++ + 1 files changed, 22 insertions(+), 0 deletions(-) + +diff --git a/test/excludes b/test/excludes +index 24d653e..f1ae9ea 100755 +--- a/test/excludes ++++ b/test/excludes +@@ -166,6 +166,16 @@ ${matching_message_ids[3]} + ${matching_message_ids[4]} + ${matching_message_ids[5]}" + ++test_begin_subtest "Search, exclude=all (thread summary)" ++output=$(notmuch search --exclude=all tag:test | notmuch_search_sanitize) ++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) ++thread:XXX 2001-01-05 [1/6] Notmuch Test Suite; No messages excluded: single match: reply 3 (inbox test unread)" ++ ++test_begin_subtest "Search, exclude=all (messages)" ++output=$(notmuch search --exclude=all --output=messages tag:test | notmuch_search_sanitize) ++test_expect_equal "$output" "${matching_message_ids[4]} ++${matching_message_ids[5]}" ++ + test_begin_subtest "Search, default exclusion: tag in query (thread summary)" + output=$(notmuch search tag:test and tag:deleted | notmuch_search_sanitize) + 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) +@@ -218,6 +228,18 @@ ${matching_message_ids[1]} + ${matching_message_ids[2]} + ${matching_message_ids[3]}" + ++test_begin_subtest "Search, exclude=all: tag in query (thread summary)" ++output=$(notmuch search --exclude=all tag:test and tag:deleted | notmuch_search_sanitize) ++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) ++thread:XXX 2001-01-05 [2/6] Notmuch Test Suite; All messages excluded: double match: reply 2 (deleted inbox test unread) ++thread:XXX 2001-01-05 [1/6] Notmuch Test Suite; Some messages excluded: single excluded match: reply 3 (deleted inbox test unread)" ++ ++test_begin_subtest "Search, exclude=all: tag in query (messages)" ++output=$(notmuch search --exclude=all --output=messages tag:test and tag:deleted | notmuch_search_sanitize) ++test_expect_equal "$output" "${matching_message_ids[0]} ++${matching_message_ids[1]} ++${matching_message_ids[2]} ++${matching_message_ids[3]}" + + ######################################################### + # Notmuch count tests +-- +1.7.9.1 +