--- /dev/null
+Return-Path: <amdragon@mit.edu>\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 C82BB431FB6\r
+ for <notmuch@notmuchmail.org>; Sun, 15 Jun 2014 19:41:05 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+ tests=[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 Tr-ZTqbsBwuX for <notmuch@notmuchmail.org>;\r
+ Sun, 15 Jun 2014 19:41:01 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-8.mit.edu (dmz-mailsec-scanner-8.mit.edu\r
+ [18.7.68.37])\r
+ (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id C972B431FAE\r
+ for <notmuch@notmuchmail.org>; Sun, 15 Jun 2014 19:40:53 -0700 (PDT)\r
+X-AuditID: 12074425-f79746d000000ecc-4e-539e5934cad8\r
+Received: from mailhub-auth-1.mit.edu ( [18.9.21.35])\r
+ (using TLS with cipher AES256-SHA (256/256 bits))\r
+ (Client did not present a certificate)\r
+ by dmz-mailsec-scanner-8.mit.edu (Symantec Messaging Gateway) with SMTP\r
+ id E8.12.03788.4395E935; Sun, 15 Jun 2014 22:40:52 -0400 (EDT)\r
+Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])\r
+ by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id s5G2eovH005168; \r
+ Sun, 15 Jun 2014 22:40:51 -0400\r
+Received: from drake.dyndns.org\r
+ (216-15-114-40.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com\r
+ [216.15.114.40]) (authenticated bits=0)\r
+ (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+ by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id s5G2enK4003386\r
+ (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+ Sun, 15 Jun 2014 22:40:50 -0400\r
+Received: from amthrax by drake.dyndns.org with local (Exim 4.77)\r
+ (envelope-from <amdragon@mit.edu>)\r
+ id 1WwMqn-0004HC-AW; Sun, 15 Jun 2014 22:40:49 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 2/5] test: Add search tests for combined name/address queries\r
+Date: Sun, 15 Jun 2014 22:40:31 -0400\r
+Message-Id: <1402886434-16169-3-git-send-email-amdragon@mit.edu>\r
+X-Mailer: git-send-email 2.0.0.rc2\r
+In-Reply-To: <1402886434-16169-1-git-send-email-amdragon@mit.edu>\r
+References: <1402886434-16169-1-git-send-email-amdragon@mit.edu>\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFtrIIsWRmVeSWpSXmKPExsUixCmqrGsSOS/YYPppHYvrN2cyOzB6PFt1\r
+ izmAMYrLJiU1J7MstUjfLoEr4//LB+wFF8UqHp6eytzAuFG4i5GTQ0LAROLapfUsELaYxIV7\r
+ 69lAbCGB2UwSJ7+kdDFyAdkbGSWWz+9jg3DuMEn8etLPCuHMZZS48O4yWDubgIbEtv3LGUFs\r
+ EQFpiZ13ZwMVcXAwC6hJ/OlSAQkLC/hKLLh8EqycRUBV4sSfRewgJbwCDhKT7upCHKEkce/K\r
+ HLApnAKOEhNXn2KHOMhB4t+ZG0wTGPkXMDKsYpRNya3SzU3MzClOTdYtTk7My0st0rXQy80s\r
+ 0UtNKd3ECAoZdhfVHYwTDikdYhTgYFTi4Z3gOC9YiDWxrLgy9xCjJAeTkigvM0iILyk/pTIj\r
+ sTgjvqg0J7X4EKMEB7OSCK+9D1CONyWxsiq1KB8mJc3BoiTO+9baKlhIID2xJDU7NbUgtQgm\r
+ K8PBoSTBaxYB1ChYlJqeWpGWmVOCkGbi4AQZzgM03BKkhre4IDG3ODMdIn+KUVFKnJcTJCEA\r
+ ksgozYPrhcX0K0ZxoFeEeXNBqniA6QCu+xXQYCagwTcXzwIZXJKIkJJqYJyrJnPN+GjMhy1X\r
+ cpPvaeWK7tbpjZVKnHV++eujod66aeZ/n6zq2ne0axJrT/03v87Xx99+KTud1j35z94aP88t\r
+ u4V63lx9si9IVMh9c6/2FGce3WeTd+079yxA87+NSMYXs6t+ZUylMZ9ORm62tMsX6N2Zve+2\r
+ ct/F3o/C50PybUsO7f40e4YSS3FGoqEWc1FxIgBUO1oIxAIAAA==\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, 16 Jun 2014 02:41:06 -0000\r
+\r
+Two of these are currently known-broken. We index the name and\r
+address parts in two separate calls to _notmuch_message_gen_terms.\r
+Currently this has the effect of placing the term positions of the\r
+prefixed terms from the second call right after those of the first\r
+call, but screws up the term positions of the non-prefixed terms.\r
+---\r
+ test/T080-search.sh | 18 ++++++++++++++++++\r
+ 1 file changed, 18 insertions(+)\r
+\r
+diff --git a/test/T080-search.sh b/test/T080-search.sh\r
+index 4f0e16c..8ed5701 100755\r
+--- a/test/T080-search.sh\r
++++ b/test/T080-search.sh\r
+@@ -62,6 +62,15 @@ add_message '[subject]="search by from (name)"' '[date]="Sat, 01 Jan 2000 12:00:\r
+ output=$(notmuch search 'from:"Search By From Name"' | notmuch_search_sanitize)\r
+ test_expect_equal "$output" "thread:XXX 2000-01-01 [1/1] Search By From Name; search by from (name) (inbox unread)"\r
+ \r
++test_begin_subtest "Search by from: (name and address)"\r
++output=$(notmuch search 'from:"Search By From Name <test@example.com>"' | notmuch_search_sanitize)\r
++test_expect_equal "$output" "thread:XXX 2000-01-01 [1/1] Search By From Name; search by from (name) (inbox unread)"\r
++\r
++test_begin_subtest "Search by from: without prefix (name and address)"\r
++test_subtest_known_broken\r
++output=$(notmuch search '"Search By From Name <test@example.com>"' | notmuch_search_sanitize)\r
++test_expect_equal "$output" "thread:XXX 2000-01-01 [1/1] Search By From Name; search by from (name) (inbox unread)"\r
++\r
+ test_begin_subtest "Search by to: (address)"\r
+ add_message '[subject]="search by to (address)"' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"' [to]=searchbyto@example.com\r
+ output=$(notmuch search to:searchbyto@example.com | notmuch_search_sanitize)\r
+@@ -72,6 +81,15 @@ add_message '[subject]="search by to (name)"' '[date]="Sat, 01 Jan 2000 12:00:00\r
+ output=$(notmuch search 'to:"Search By To Name"' | notmuch_search_sanitize)\r
+ test_expect_equal "$output" "thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; search by to (name) (inbox unread)"\r
+ \r
++test_begin_subtest "Search by to: (name and adress)"\r
++output=$(notmuch search 'to:"Search By To Name <test@example.com>"' | notmuch_search_sanitize)\r
++test_expect_equal "$output" "thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; search by to (name) (inbox unread)"\r
++\r
++test_begin_subtest "Search by to: without prefix (name and adress)"\r
++test_subtest_known_broken\r
++output=$(notmuch search '"Search By To Name <test@example.com>"' | notmuch_search_sanitize)\r
++test_expect_equal "$output" "thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; search by to (name) (inbox unread)"\r
++\r
+ test_begin_subtest "Search by subject: (phrase)"\r
+ add_message '[subject]="subject search test (phrase)"' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"'\r
+ add_message '[subject]="this phrase should not match the subject search test"' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"'\r
+-- \r
+2.0.0.rc2\r
+\r