[PATCH 2/4] test: only exclude "deleted" messages from search if explicitly configured
Pieter Praet
pieter at praet.org
Thu Jan 19 11:19:02 PST 2012
If the 'search.exclude_tags' option is missing from the config file,
its value is automatically set to "deleted;spam;". Taking PoLS/DWIM
into account, this should probably only happen during setup.
---
test/search | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/test/search b/test/search
index bf965e7..99d94bd 100755
--- a/test/search
+++ b/test/search
@@ -130,6 +130,7 @@ output=$(notmuch search "bödý" | notmuch_search_sanitize)
test_expect_equal "$output" "thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; utf8-message-body-subject (inbox unread)"
test_begin_subtest "Exclude \"deleted\" messages from search"
+notmuch config set search.exclude_tags = deleted
generate_message '[subject]="Not deleted"'
generate_message '[subject]="Deleted"'
notmuch new > /dev/null
@@ -147,4 +148,11 @@ output=$(notmuch search subject:deleted | notmuch_search_sanitize)
test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Not deleted (inbox unread)
thread:XXX 2001-01-05 [1/2] Notmuch Test Suite; Not deleted reply (deleted inbox unread)"
+test_begin_subtest "Don't exclude \"deleted\" messages from search if not configured"
+test_subtest_known_broken
+notmuch config set search.exclude_tags
+output=$(notmuch search subject:deleted | notmuch_search_sanitize)
+test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Not deleted (inbox unread)
+thread:XXX 2001-01-05 [2/2] Notmuch Test Suite; Deleted (deleted inbox unread)"
+
test_done
--
1.7.8.1
More information about the notmuch
mailing list