[PATCH] test: add known broken test for long directory bug

Subject: [PATCH] test: add known broken test for long directory bug

Date: Wed, 17 Mar 2021 22:25:09 -0300

To: Gregor Zattler, notmuch

Cc: David Bremner

From: David Bremner

In [1] Gregor Zattler explained the results of his hard working
tracking down a bug in notmuch with long directories. This test
duplicates the bug.

[1]: id:20210317194728.GB5561@no.workgroup
 test/T050-new.sh | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/test/T050-new.sh b/test/T050-new.sh
index 76bda959..f84dc2b0 100755
--- a/test/T050-new.sh
+++ b/test/T050-new.sh
@@ -339,6 +339,20 @@ test_expect_code 1 "NOTMUCH_NEW --debug 2>&1"
 notmuch config set new.tags $OLDCONFIG
+test_begin_subtest "Long directory names don't cause rescan"
+name=$(printf 'z%.0s' {1..234})
+generate_message [dir]=$name
+notmuch new  >> OUTPUT
+rm -r ${MAIL_DIR}/${name}
+notmuch new >> OUTPUT
+Added 1 new message to the database.
+No new mail.
+No new mail. Removed 1 message.
+test_expect_equal_file EXPECTED OUTPUT
 test_begin_subtest "Xapian exception: read only files"
 chmod u-w ${MAIL_DIR}/.notmuch/xapian/*.*
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org