unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: notmuch@notmuchmail.org
Subject: [PATCH 1/2] test: add known broken test for ignoring non-toplevel .notmuch
Date: Sun, 26 Dec 2021 08:24:09 -0400	[thread overview]
Message-ID: <20211226122410.1993982-1-david@tethera.net> (raw)

In [1] Rob observed that notmuch new ignored directories called
.notmuch everywhere in the tree, where they should only (and now, with
split configs, at most) be ignored at the top level. Add a test to
demonstrate the problem.

[1]: id:87mwhifu9a.fsf@trouble.defaultvalue.org
---
 test/T050-new.sh | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/test/T050-new.sh b/test/T050-new.sh
index 7ea127d3..db13090b 100755
--- a/test/T050-new.sh
+++ b/test/T050-new.sh
@@ -351,6 +351,17 @@ test_expect_code 1 "NOTMUCH_NEW --debug 2>&1"
 
 notmuch config set new.tags $OLDCONFIG
 
+test_begin_subtest ".notmuch only ignored at top level"
+test_subtest_known_broken
+generate_message '[dir]=foo/bar/.notmuch/cur' '[subject]="Do not ignore, very important"'
+NOTMUCH_NEW > OUTPUT
+notmuch search subject:Do-not-ignore | notmuch_search_sanitize >> OUTPUT
+cat <<EOF > EXPECTED
+Added 1 new message to the database.
+thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Do not ignore, very important (inbox unread)
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
 test_begin_subtest "RFC822 group names are indexed"
 test_subtest_known_broken
 generate_message [to]="undisclosed-recipients:"
-- 
2.34.1

             reply	other threads:[~2021-12-26 12:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-26 12:24 David Bremner [this message]
2021-12-26 12:24 ` [PATCH 2/2] cli/new: only ignore .notmuch at top level David Bremner
2022-01-16 15:10 ` [PATCH 1/2] test: add known broken test for ignoring non-toplevel .notmuch 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=20211226122410.1993982-1-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).