Anything that does not look like a wildcard should be safe to
quote. This should fix the problem searching for xapian keywords.
* phrase parsing, when possible */
std::string query_str;
* phrase parsing, when possible */
std::string query_str;
- if (str.find (' ') != std::string::npos)
+ if (*str.rbegin () != '*' || str.find (' ') != std::string::npos)
query_str = '"' + str + '"';
else
query_str = str;
query_str = '"' + str + '"';
else
query_str = str;
printf "id:$gen_msg_id\n" > EXPECTED
test_begin_subtest "quoted xapian keyword search for from:"
printf "id:$gen_msg_id\n" > EXPECTED
test_begin_subtest "quoted xapian keyword search for from:"
-test_subtest_known_broken
notmuch search --output=messages 'from:"and"' > OUTPUT
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "quoted xapian keyword search for subject:"
notmuch search --output=messages 'from:"and"' > OUTPUT
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "quoted xapian keyword search for subject:"
-test_subtest_known_broken
notmuch search --output=messages 'subject:"and-and-and"' > OUTPUT
test_expect_equal_file EXPECTED OUTPUT
notmuch search --output=messages 'subject:"and-and-and"' > OUTPUT
test_expect_equal_file EXPECTED OUTPUT