On Wed, Aug 21 2019, David Bremner wrote: > 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. implementation =D > --- > 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 <<EOF > EXPECTED > +1 > +1 > +2 > +0 > +EOF the above could be done printf %s\\n 1 1 2 0 > EXPECTED (whichever way is "clearer" -- using '%s\n' or even "%s\n" is also possible (just increasingly harder to write ;D)) Tomi > + 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 _______________________________________________ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch