]> git.cworth.org Git - notmuch/blobdiff - test/T080-search.sh
CLI/search+address: support sexpr queries
[notmuch] / test / T080-search.sh
index 70f2854973a9ca29e1cf0c9d483cf1b00564e7f4..9bda1eb9f4e4597eb0f64cad3272c0260941dac0 100755 (executable)
@@ -85,11 +85,11 @@ add_message '[subject]="search by to (name)"' '[date]="Sat, 01 Jan 2000 12:00:00
 output=$(notmuch search 'to:"Search By To Name"' | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; search by to (name) (inbox unread)"
 
-test_begin_subtest "Search by to: (name and adress)"
+test_begin_subtest "Search by to: (name and address)"
 output=$(notmuch search 'to:"Search By To Name <test@example.com>"' | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; search by to (name) (inbox unread)"
 
-test_begin_subtest "Search by to: without prefix (name and adress)"
+test_begin_subtest "Search by to: without prefix (name and address)"
 output=$(notmuch search '"Search By To Name <test@example.com>"' | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; search by to (name) (inbox unread)"
 
@@ -189,4 +189,11 @@ test_begin_subtest "parts do not have adjacent term positions"
 output=$(notmuch search id:termpos and '"c x"')
 test_expect_equal "$output" ""
 
+if [[ NOTMUCH_HAVE_SFSEXP = 1 ]]; then
+    test_begin_subtest "sexpr query: all messages"
+    notmuch search '*' > EXPECTED
+    notmuch search --query=sexp '()' > OUTPUT
+    test_expect_equal_file EXPECTED OUTPUT
+fi
+
 test_done