From: David Bremner <david@tethera.net>
To: notmuch@notmuchmail.org
Cc: David Bremner <david@tethera.net>
Subject: [PATCH 5/6] test: add regression test for searching with alternate config
Date: Sun, 20 Dec 2020 08:10:23 -0400 [thread overview]
Message-ID: <20201220121024.1122362-6-david@tethera.net> (raw)
In-Reply-To: <20201220121024.1122362-1-david@tethera.net>
Make sure upcoming changes to config handling do not break command
line specification.
---
test/T140-excludes.sh | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/test/T140-excludes.sh b/test/T140-excludes.sh
index 0cf69975..cef07095 100755
--- a/test/T140-excludes.sh
+++ b/test/T140-excludes.sh
@@ -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 <<EOF > 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"
--
2.29.2
next prev parent reply other threads:[~2020-12-20 12:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-20 12:10 v2 preliminaries for merged config David Bremner
2020-12-20 12:10 ` [PATCH 1/6] test: use keys with group 'test' in T590-libconfig David Bremner
2020-12-20 12:10 ` [PATCH 2/6] lib: factor out feature name related code David Bremner
2020-12-20 12:10 ` [PATCH 3/6] lib: factor out prefix related code to its own file David Bremner
2020-12-20 15:36 ` Tomi Ollila
2020-12-20 20:03 ` David Bremner
2020-12-20 12:10 ` [PATCH 4/6] lib/config: delay setting talloc destructor David Bremner
2020-12-20 12:10 ` David Bremner [this message]
2020-12-20 12:10 ` [PATCH 6/6] lib: factor out notmuch_database_open* related code to own file David Bremner
2020-12-23 23:50 ` v2 preliminaries for merged config David Bremner
-- strict thread matches above, loose matches on Subject: below --
2020-08-12 22:49 David Bremner
2020-08-12 22:49 ` [PATCH 5/6] test: add regression test for searching with alternate config David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201220121024.1122362-6-david@tethera.net \
--to=david@tethera.net \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).