[PATCH] test: regression test for custom header config in python

Subject: [PATCH] test: regression test for custom header config in python

Date: Fri, 24 Apr 2026 08:18:19 +0900

To: notmuch@notmuchmail.org

Cc:

From: David Bremner


According to https://github.com/gauteh/lieer/issues/238, at some point
there was a problem with lieer getting some config info, that seems to
have "gone away". This test is intended to prevent this kind of
problem from creeping (back?) into the bindings.
---
 test/T392-python-cffi-notmuch.sh | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/test/T392-python-cffi-notmuch.sh b/test/T392-python-cffi-notmuch.sh
index 06161219..2cd3b919 100755
--- a/test/T392-python-cffi-notmuch.sh
+++ b/test/T392-python-cffi-notmuch.sh
@@ -45,4 +45,15 @@ cat <<EOF > EXPECTED
 EOF
 test_expect_equal_file EXPECTED OUTPUT.sample
 
+test_begin_subtest "custom header config"
+notmuch config set index.header.List List-Id
+test_python <<EOF | grep ^index > OUTPUT
+from notmuch2 import Database
+db = Database(config=Database.CONFIG.SEARCH)
+print(db.config['index.header.List'])
+EOF
+cat<<EOF > EXPECTED
+List-Id
+EOF
+test_expect_equal_file EXPECTED OUTPUT
 test_done
-- 
2.53.0

_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: