From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id F27336DE0F54 for ; Wed, 21 Aug 2019 05:25:20 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.052 X-Spam-Level: X-Spam-Status: No, score=-0.052 tagged_above=-999 required=5 tests=[AWL=-0.051, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jv3VdmNHCa3H for ; Wed, 21 Aug 2019 05:25:20 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 658706DE0BB8 for ; Wed, 21 Aug 2019 05:25:20 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.89) (envelope-from ) id 1i0P1g-0002Jx-Jg; Wed, 21 Aug 2019 07:43:40 -0400 Received: (nullmailer pid 23849 invoked by uid 1000); Wed, 21 Aug 2019 11:41:27 -0000 From: David Bremner To: "Rollins, Jameson" , David Bremner , "Jorge P. de Morais Neto" , "notmuch@notmuchmail.org" Subject: [PATCH 1/3] test: add known broken tests for from: and subject: Date: Wed, 21 Aug 2019 08:41:24 -0300 Message-Id: <20190821114126.23540-2-david@tethera.net> X-Mailer: git-send-email 2.23.0.rc1 In-Reply-To: <20190821114126.23540-1-david@tethera.net> References: <87v9urjch9.fsf@caltech.edu> <20190821114126.23540-1-david@tethera.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 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: Wed, 21 Aug 2019 12:25:21 -0000 Given we want 'a b' to parse as 'a AND b', then for any probabilistic (free text) prefix foo:, we should also get 'foo:a foo:b' expanding to 'foo:a AND foo:b'. Currently this is not true due to the implimentation of regex fields. --- test/T760-implicit-operators.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 test/T760-implicit-operators.sh diff --git a/test/T760-implicit-operators.sh b/test/T760-implicit-operators.sh new file mode 100755 index 00000000..b79673df --- /dev/null +++ b/test/T760-implicit-operators.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash +test_description='implicit operators in query parser' +. $(dirname "$0")/test-lib.sh || exit 1 + +test_AND() { + add_message "[$1]=a@b" + add_message "[$1]=b@c" + + test_begin_subtest "$1: implicitly joined by AND" + $2 + notmuch count $1:a@b > OUTPUT + notmuch count $1:a $1:b >> OUTPUT + notmuch count $1:a@b OR $1:b@c >> OUTPUT + notmuch count $1:a@b $1:b@c >> OUTPUT + cat < EXPECTED +1 +1 +2 +0 +EOF + test_expect_equal_file EXPECTED OUTPUT +} + +test_AND from test_subtest_known_broken +test_AND subject test_subtest_known_broken +test_AND to + +test_done -- 2.23.0.rc1