X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=test%2FT650-regexp-query.sh;h=e792decf4e1657c08edb45a4d6bbea3b2d2c132d;hb=168211c5632189c53415d25530b759ad3678c92c;hp=d5def7649d0f71fda66c9910e611ec04a5741b10;hpb=ed4a9082c02d0a73f5f7d07f90a7daf65bde0aaa;p=notmuch diff --git a/test/T650-regexp-query.sh b/test/T650-regexp-query.sh index d5def764..e792decf 100755 --- a/test/T650-regexp-query.sh +++ b/test/T650-regexp-query.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash test_description='regular expression searches' -. ./test-lib.sh || exit 1 +. $(dirname "$0")/test-lib.sh || exit 1 if [ $NOTMUCH_HAVE_XAPIAN_FIELD_PROCESSOR -eq 0 ]; then test_done @@ -77,6 +77,19 @@ test_expect_equal_file cworth.msg-ids OUTPUT test_begin_subtest "xapian wildcard search for subject:" test_expect_equal $(notmuch count 'subject:count*') 1 +add_message '[from]="and"' '[subject]="and-and-and"' +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:" +test_subtest_known_broken +notmuch search --output=messages 'subject:"and-and-and"' > OUTPUT +test_expect_equal_file EXPECTED OUTPUT + test_begin_subtest "regexp from search, case sensitive" notmuch search --output=messages from:/carl/ > OUTPUT test_expect_equal_file /dev/null OUTPUT @@ -137,10 +150,10 @@ EOF test_expect_equal_file EXPECTED OUTPUT test_begin_subtest "regexp error reporting" -notmuch search 'from:/unbalanced[/' 1>OUTPUT 2>&1 +notmuch search 'from:/unbalanced[/' 2>&1 | sed -e '/^A Xapian/ s/[^:]*$//' > OUTPUT cat < EXPECTED notmuch search: A Xapian exception occurred -A Xapian exception occurred parsing query: Invalid regular expression +A Xapian exception occurred parsing query: Regexp error: Query string was: from:/unbalanced[/ EOF test_expect_equal_file EXPECTED OUTPUT