diff options
author | Peter Wang <novalazy@gmail.com> | 2013-05-11 20:50:04 +0100 |
---|---|---|
committer | David Bremner <bremner@unb.ca> | 2013-05-13 21:32:46 -0300 |
commit | 42102e0b3f8d69214eb4b9e2b1405499317410e7 (patch) | |
tree | 77a3ff70d5ef8298bbbb3efa9fec272410e07db2 /test | |
parent | e691783b3b9d564c390f5ebb2e0e4be348ec16ef (diff) |
test: add tests for search --exclude=all
Test the new search --exclude=all option.
Diffstat (limited to 'test')
-rwxr-xr-x | test/excludes | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/excludes b/test/excludes index 24d653ea..f1ae9ea9 100755 --- a/test/excludes +++ b/test/excludes @@ -166,6 +166,16 @@ ${matching_message_ids[3]} ${matching_message_ids[4]} ${matching_message_ids[5]}" +test_begin_subtest "Search, exclude=all (thread summary)" +output=$(notmuch search --exclude=all tag:test | notmuch_search_sanitize) +test_expect_equal "$output" "thread:XXX 2001-01-05 [1/5] Notmuch Test Suite; Some messages excluded: single non-excluded match: reply 4 (inbox test unread) +thread:XXX 2001-01-05 [1/6] Notmuch Test Suite; No messages excluded: single match: reply 3 (inbox test unread)" + +test_begin_subtest "Search, exclude=all (messages)" +output=$(notmuch search --exclude=all --output=messages tag:test | notmuch_search_sanitize) +test_expect_equal "$output" "${matching_message_ids[4]} +${matching_message_ids[5]}" + test_begin_subtest "Search, default exclusion: tag in query (thread summary)" output=$(notmuch search tag:test and tag:deleted | notmuch_search_sanitize) test_expect_equal "$output" "thread:XXX 2001-01-05 [1/6] Notmuch Test Suite; All messages excluded: single match: reply 2 (deleted inbox test unread) @@ -218,6 +228,18 @@ ${matching_message_ids[1]} ${matching_message_ids[2]} ${matching_message_ids[3]}" +test_begin_subtest "Search, exclude=all: tag in query (thread summary)" +output=$(notmuch search --exclude=all tag:test and tag:deleted | notmuch_search_sanitize) +test_expect_equal "$output" "thread:XXX 2001-01-05 [1/6] Notmuch Test Suite; All messages excluded: single match: reply 2 (deleted inbox test unread) +thread:XXX 2001-01-05 [2/6] Notmuch Test Suite; All messages excluded: double match: reply 2 (deleted inbox test unread) +thread:XXX 2001-01-05 [1/6] Notmuch Test Suite; Some messages excluded: single excluded match: reply 3 (deleted inbox test unread)" + +test_begin_subtest "Search, exclude=all: tag in query (messages)" +output=$(notmuch search --exclude=all --output=messages tag:test and tag:deleted | notmuch_search_sanitize) +test_expect_equal "$output" "${matching_message_ids[0]} +${matching_message_ids[1]} +${matching_message_ids[2]} +${matching_message_ids[3]}" ######################################################### # Notmuch count tests |