From: Jani Nikula <jani@nikula.org>
To: notmuch@notmuchmail.org
Subject: [PATCH 6/6] test: test regexp based new.ignore
Date: Fri, 1 Sep 2017 18:53:11 +0300 [thread overview]
Message-ID: <c51d5d563b48114493dd3995826b4e1baa9d6828.1504280923.git.jani@nikula.org> (raw)
In-Reply-To: <cover.1504280923.git.jani@nikula.org>
In-Reply-To: <cover.1504280923.git.jani@nikula.org>
Just some basics.
---
test/T050-new.sh | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/test/T050-new.sh b/test/T050-new.sh
index 272ed417aa2e..ee9ce08c8e86 100755
--- a/test/T050-new.sh
+++ b/test/T050-new.sh
@@ -259,6 +259,28 @@ ln -s i_do_not_exist "${MAIL_DIR}"/broken_link
output=$(NOTMUCH_NEW 2>&1)
test_expect_equal "$output" "No new mail."
+test_begin_subtest "Ignore files and directories specified in new.ignore (regexp)"
+notmuch config set new.ignore ".git" "/^bro.*ink\$/" "/ignored.*file/"
+output=$(NOTMUCH_NEW --debug 2>&1 | sort)
+test_expect_equal "$output" \
+"(D) add_files, pass 1: explicitly ignoring ${MAIL_DIR}/.git
+(D) add_files, pass 1: explicitly ignoring ${MAIL_DIR}/.ignored_hidden_file
+(D) add_files, pass 1: explicitly ignoring ${MAIL_DIR}/broken_link
+(D) add_files, pass 1: explicitly ignoring ${MAIL_DIR}/ignored_file
+(D) add_files, pass 1: explicitly ignoring ${MAIL_DIR}/one/ignored_file
+(D) add_files, pass 1: explicitly ignoring ${MAIL_DIR}/one/two/ignored_file
+(D) add_files, pass 1: explicitly ignoring ${MAIL_DIR}/one/two/three/.git
+(D) add_files, pass 1: explicitly ignoring ${MAIL_DIR}/one/two/three/ignored_file
+(D) add_files, pass 2: explicitly ignoring ${MAIL_DIR}/.git
+(D) add_files, pass 2: explicitly ignoring ${MAIL_DIR}/.ignored_hidden_file
+(D) add_files, pass 2: explicitly ignoring ${MAIL_DIR}/broken_link
+(D) add_files, pass 2: explicitly ignoring ${MAIL_DIR}/ignored_file
+(D) add_files, pass 2: explicitly ignoring ${MAIL_DIR}/one/ignored_file
+(D) add_files, pass 2: explicitly ignoring ${MAIL_DIR}/one/two/ignored_file
+(D) add_files, pass 2: explicitly ignoring ${MAIL_DIR}/one/two/three/.git
+(D) add_files, pass 2: explicitly ignoring ${MAIL_DIR}/one/two/three/ignored_file
+No new mail."
+
test_begin_subtest "Quiet: No new mail."
output=$(NOTMUCH_NEW --quiet)
test_expect_equal "$output" ""
--
2.11.0
next prev parent reply other threads:[~2017-09-01 15:53 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-01 15:53 [PATCH 0/6] cli: support regex in new.ignore Jani Nikula
2017-09-01 15:53 ` [PATCH 1/6] cli/new: use the same style for fs entry loops Jani Nikula
2017-09-13 12:08 ` David Bremner
2017-09-01 15:53 ` [PATCH 2/6] cli/new: abstract special directory check Jani Nikula
2017-09-01 15:53 ` [PATCH 3/6] cli/new: check for special directories earlier in pass 1 Jani Nikula
2017-10-02 11:05 ` David Bremner
2017-09-01 15:53 ` [PATCH 4/6] cli/new: ignore special directories also in pass 2 Jani Nikula
2017-09-01 15:53 ` [PATCH 5/6] cli/new: support /<regex>/ in new.ignore Jani Nikula
2017-09-26 2:13 ` David Bremner
2017-09-26 19:11 ` Jani Nikula
2017-10-02 1:00 ` David Bremner
2017-09-01 15:53 ` Jani Nikula [this message]
2017-10-02 0:57 ` [PATCH 6/6] test: test regexp based new.ignore David Bremner
2017-10-02 8:56 ` 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=c51d5d563b48114493dd3995826b4e1baa9d6828.1504280923.git.jani@nikula.org \
--to=jani@nikula.org \
--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).