X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=test%2FT140-excludes.sh;h=cef07095caf329910c7c997ece5f50b640b06177;hb=133188837472dacef2ef72ca8416ccd12896c189;hp=8bbbc2dd033700119bc6768264940eab821b0d06;hpb=957fc2e1a7d00636c7eaaf487edae65e7a63dc8f;p=notmuch diff --git a/test/T140-excludes.sh b/test/T140-excludes.sh index 8bbbc2dd..cef07095 100755 --- a/test/T140-excludes.sh +++ b/test/T140-excludes.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash test_description='"notmuch search, count and show" with excludes in several variations' -. ./test-lib.sh +. $(dirname "$0")/test-lib.sh || exit 1 # Generates a thread consisting of a top level message and 'length' # replies. The subject of the top message 'subject: top message" @@ -39,6 +39,16 @@ deleted_id=$gen_msg_id 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)" +test_begin_subtest "Search, exclude \"deleted\" messages; alternate config file" +cp ${NOTMUCH_CONFIG} alt-config +notmuch config set search.exclude_tags +notmuch --config=alt-config search subject:deleted | notmuch_search_sanitize > OUTPUT +cp alt-config ${NOTMUCH_CONFIG} +cat < EXPECTED +thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Not deleted (inbox unread) +EOF +test_expect_equal_file EXPECTED OUTPUT + test_begin_subtest "Search, exclude \"deleted\" messages from message search" output=$(notmuch search --output=messages subject:deleted | notmuch_search_sanitize) test_expect_equal "$output" "id:$not_deleted_id"