X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=test%2FT081-sexpr-search.sh;h=4a051a50676cfc962467ff735667e3d113f5f572;hb=90d9c2ad5c459624d17f92d0844e7a7fbb87d7a2;hp=90cef50c237e48bb083a22f4e647ffdb850e06fa;hpb=200e164dc7acc3f19c6fe39164c472985e1ba384;p=notmuch diff --git a/test/T081-sexpr-search.sh b/test/T081-sexpr-search.sh index 90cef50c..4a051a50 100755 --- a/test/T081-sexpr-search.sh +++ b/test/T081-sexpr-search.sh @@ -102,15 +102,32 @@ EOF test_expect_equal_file EXPECTED OUTPUT test_begin_subtest "Search by 'subject' (utf-8, phrase-token):" -test_subtest_known_broken output=$(notmuch search --query=sexp '(subject utf8-sübjéct)' | notmuch_search_sanitize) test_expect_equal "$output" "thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; utf8-sübjéct (inbox unread)" test_begin_subtest "Search by 'subject' (utf-8, quoted string):" -test_subtest_known_broken output=$(notmuch search --query=sexp '(subject "utf8 sübjéct")' | notmuch_search_sanitize) test_expect_equal "$output" "thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; utf8-sübjéct (inbox unread)" +test_begin_subtest "Search by 'subject' (combine phrase, term):" +output=$(notmuch search --query=sexp '(subject Mac "compatibility issues")' | notmuch_search_sanitize) +test_expect_equal "$output" "thread:XXX 2009-11-18 [4/4] Jjgod Jiang, Alexander Botero-Lowry; [notmuch] Mac OS X/Darwin compatibility issues (inbox unread)" + +test_begin_subtest "Search by 'subject' (combine phrase, term 2):" +notmuch search --query=sexp '(subject (or utf8 "compatibility issues"))' | notmuch_search_sanitize > OUTPUT +cat < EXPECTED +thread:XXX 2009-11-18 [4/4] Jjgod Jiang, Alexander Botero-Lowry; [notmuch] Mac OS X/Darwin compatibility issues (inbox unread) +thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; utf8-sübjéct (inbox unread) +EOF +test_expect_equal_file EXPECTED OUTPUT + +test_begin_subtest "Search by 'subject' (combine phrase, term 3):" +notmuch search --query=sexp '(subject issues X/Darwin)' | notmuch_search_sanitize > OUTPUT +cat < EXPECTED +thread:XXX 2009-11-18 [4/4] Jjgod Jiang, Alexander Botero-Lowry; [notmuch] Mac OS X/Darwin compatibility issues (inbox unread) +EOF +test_expect_equal_file EXPECTED OUTPUT + test_begin_subtest "Unbalanced parens" # A code 1 indicates the error was handled (a crash will return e.g. 139). test_expect_code 1 "notmuch search --query=sexp '('"