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