From: David Bremner <david@tethera.net>
To: Sean Whitton <spwhitton@spwhitton.name>, notmuch@notmuchmail.org
Subject: [PATCH 1/2] test: known broken tests for bracketed terms in subject
Date: Thu, 24 Feb 2022 22:41:02 -0400 [thread overview]
Message-ID: <20220225024103.1026629-2-david@tethera.net> (raw)
In-Reply-To: <20220225024103.1026629-1-david@tethera.net>
The heuristics in the field processor currently incorrectly trigger
phrase parsing.
---
test/T650-regexp-query.sh | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/test/T650-regexp-query.sh b/test/T650-regexp-query.sh
index 55dc6c88..4ee6b171 100755
--- a/test/T650-regexp-query.sh
+++ b/test/T650-regexp-query.sh
@@ -65,6 +65,24 @@ thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; - (inbox unread)
EOF
test_expect_equal_file EXPECTED OUTPUT
+test_begin_subtest "bracketed subject search (with dquotes)"
+test_subtest_known_broken
+notmuch search subject:notmuch and subject:show > EXPECTED
+notmuch search 'subject:"(show notmuch)"' > OUTPUT
+test_expect_equal_file_nonempty EXPECTED OUTPUT
+
+test_begin_subtest "bracketed subject search (with dquotes and operator 'or')"
+test_subtest_known_broken
+notmuch search subject:notmuch or subject:show > EXPECTED
+notmuch search 'subject:"(notmuch or show)"' > OUTPUT
+test_expect_equal_file_nonempty EXPECTED OUTPUT
+
+test_begin_subtest "bracketed subject search (with dquotes and operator 'and')"
+test_subtest_known_broken
+notmuch search subject:notmuch and subject:show > EXPECTED
+notmuch search 'subject:"(notmuch and show)"' > OUTPUT
+test_expect_equal_file_nonempty EXPECTED OUTPUT
+
test_begin_subtest "xapian wildcard search for from:"
notmuch search --output=messages 'from:cwo*' > OUTPUT
test_expect_equal_file cworth.msg-ids OUTPUT
--
2.34.1
next prev parent reply other threads:[~2022-02-25 2:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-23 15:20 Parenthesised query breaks query it is embedded in Sean Whitton
2022-02-25 2:41 ` fix for parsing bracketed expression David Bremner
2022-02-25 2:41 ` David Bremner [this message]
2022-03-19 10:38 ` [PATCH 1/2] test: known broken tests for bracketed terms in subject David Bremner
2022-03-20 16:29 ` Sean Whitton
2022-02-25 2:41 ` [PATCH 2/2] lib: do not phrase parse prefixed bracketed subexpressions David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220225024103.1026629-2-david@tethera.net \
--to=david@tethera.net \
--cc=notmuch@notmuchmail.org \
--cc=spwhitton@spwhitton.name \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).