X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=test%2FT650-regexp-query.sh;h=55dc6c8870d3a1fd8eccbf280bc79628e9b36aec;hp=31b3d036eba06ff4f6f917f323e2d9d143b4cd6e;hb=b415ec06c309974247d202c21a0f9f1b0d828f5d;hpb=9f7e851263b96acacc9ea542e9f5d837563fea05 diff --git a/test/T650-regexp-query.sh b/test/T650-regexp-query.sh index 31b3d036..55dc6c88 100755 --- a/test/T650-regexp-query.sh +++ b/test/T650-regexp-query.sh @@ -2,10 +2,6 @@ test_description='regular expression searches' . $(dirname "$0")/test-lib.sh || exit 1 -if [ $NOTMUCH_HAVE_XAPIAN_FIELD_PROCESSOR -eq 0 ]; then - test_done -fi - add_message '[dir]=bad' '[subject]="To the bone"' add_message '[dir]=.' '[subject]="Top level"' add_message '[dir]=bad/news' '[subject]="Bears"' @@ -47,7 +43,6 @@ output=$(notmuch search 'path:/^bad$/' | notmuch_search_sanitize) test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; To the bone (inbox unread)" # Use "standard" corpus from here on. -rm -rf $MAIL_DIR add_email_corpus notmuch search --output=messages from:cworth > cworth.msg-ids @@ -77,6 +72,17 @@ 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:" +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 '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