[PATCH 1/2] test: add tests for message only search
authorMark Walters <markwalters1009@gmail.com>
Mon, 12 Mar 2012 11:31:53 +0000 (11:31 +0000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:45:26 +0000 (09:45 -0800)
56/f352f8c50eb37b8aa439d7cec70bfd9b509a25 [new file with mode: 0644]

diff --git a/56/f352f8c50eb37b8aa439d7cec70bfd9b509a25 b/56/f352f8c50eb37b8aa439d7cec70bfd9b509a25
new file mode 100644 (file)
index 0000000..f18e32c
--- /dev/null
@@ -0,0 +1,100 @@
+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 ABFC1431FC2\r
+       for <notmuch@notmuchmail.org>; Mon, 12 Mar 2012 04:32:01 -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 V3S0Azo6zs3t for <notmuch@notmuchmail.org>;\r
+       Mon, 12 Mar 2012 04:32:01 -0700 (PDT)\r
+Received: from mail-we0-f181.google.com (mail-we0-f181.google.com\r
+       [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 12846431FAF\r
+       for <notmuch@notmuchmail.org>; Mon, 12 Mar 2012 04:32:00 -0700 (PDT)\r
+Received: by werm13 with SMTP id m13so3639546wer.26\r
+       for <notmuch@notmuchmail.org>; Mon, 12 Mar 2012 04:31:59 -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=2I3wOw4hg00YgDAE+2CQ4mJZ2kAkaBH/IoYUfNaRsqc=;\r
+       b=cdeNiTFTZfMhw2wlgtm3NakcLlVn5j7DcHHog4xHN2rgBKlkOXY0J0E4INxEDtfjHc\r
+       QJlCqtre5wPp073bBlC4syOUP0EWJcNhPXIWSQSxU82PnyHT+pHF+uYEQ2pJlz4aA2OA\r
+       r/fGlTEfERwxX/w947sXp00KsWTZMUbWGENGX4jf1WW/n54Ig5pmYZO2DTIF6q/nHcD/\r
+       +D0K3Ww8Ptva1O8lqKJiic1rBonGaAvIhmPuNSFJT8Mbdbw3UehH+P/wA2WLlgCcI5xT\r
+       ixMCxLvip2VeGW+McIZtXsVfkq05KN0ysYh6339KHg/ba83ZQxydyzmtexDpxATP5Jgf\r
+       Wszw==\r
+Received: by 10.216.135.206 with SMTP id u56mr7114586wei.29.1331551919901;\r
+       Mon, 12 Mar 2012 04:31:59 -0700 (PDT)\r
+Received: from localhost (94-192-233-223.zone6.bethere.co.uk.\r
+ [94.192.233.223])     by mx.google.com with ESMTPS id\r
+ 9sm57004882wid.2.2012.03.12.04.31.58  (version=TLSv1/SSLv3 cipher=OTHER);     Mon,\r
+ 12 Mar 2012 04:31:59 -0700 (PDT)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 1/2] test: add tests for message only search\r
+Date: Mon, 12 Mar 2012 11:31:53 +0000\r
+Message-Id: <1331551914-28323-2-git-send-email-markwalters1009@gmail.com>\r
+X-Mailer: git-send-email 1.7.9.1\r
+In-Reply-To: <1331551914-28323-1-git-send-email-markwalters1009@gmail.com>\r
+References: <1331551914-28323-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: Mon, 12 Mar 2012 11:32:01 -0000\r
+\r
+This adds two tests for --output=messages searches one of which fails\r
+in some configurations.\r
+---\r
+ test/search |   11 +++++++++++\r
+ 1 files changed, 11 insertions(+), 0 deletions(-)\r
+\r
+diff --git a/test/search b/test/search\r
+index 081f60c..276271b 100755\r
+--- a/test/search\r
++++ b/test/search\r
+@@ -132,13 +132,24 @@ test_expect_equal "$output" "thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; u\r
+ test_begin_subtest "Exclude \"deleted\" messages from search"\r
+ notmuch config set search.exclude_tags = deleted\r
+ generate_message '[subject]="Not deleted"'\r
++not_deleted_id=$gen_msg_id\r
+ generate_message '[subject]="Deleted"'\r
+ notmuch new > /dev/null\r
+ notmuch tag +deleted id:$gen_msg_id\r
++deleted_id=$gen_msg_id\r
+ output=$(notmuch search subject:deleted | notmuch_search_sanitize)\r
+ test_expect_equal "$output" "thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Not deleted (inbox unread)\r
+ thread:XXX   2001-01-05 [0/1] Notmuch Test Suite; Deleted (deleted inbox unread)"\r
+ \r
++test_begin_subtest "Exclude \"deleted\" messages from message search"\r
++output=$(notmuch search --output=messages subject:deleted | notmuch_search_sanitize)\r
++test_expect_equal "$output" "id:$not_deleted_id"\r
++\r
++test_begin_subtest "Exclude \"deleted\" messages from message search (no-exclude)"\r
++output=$(notmuch search --no-exclude --output=messages subject:deleted | notmuch_search_sanitize)\r
++test_expect_equal "$output" "id:$not_deleted_id\r
++id:$deleted_id"\r
++\r
+ test_begin_subtest "Exclude \"deleted\" messages from search, overridden"\r
+ output=$(notmuch search subject:deleted and tag:deleted | notmuch_search_sanitize)\r
+ test_expect_equal "$output" "thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Deleted (deleted inbox unread)"\r
+-- \r
+1.7.9.1\r
+\r