[PATCH 2/6] test: add test for creating database in various configurations.

Subject: [PATCH 2/6] test: add test for creating database in various configurations.

Date: Fri, 29 Jul 2022 09:19:57 -0300

To: notmuch@notmuchmail.org

Cc: spwhitton@spwhitton.name

From: David Bremner


The existing database creation (via add_email_corpus) was always done
in the traditional configuration. The use of xapian-metadata is just
to portably ensure that there is a database created where we expect
there to be.
---
 test/T055-path-config.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/test/T055-path-config.sh b/test/T055-path-config.sh
index 58c824a2..45545d88 100755
--- a/test/T055-path-config.sh
+++ b/test/T055-path-config.sh
@@ -313,6 +313,12 @@ user.other_email
 user.primary_email
 EOF
    test_expect_equal_file EXPECTED OUTPUT
+
+   test_begin_subtest "create database ($config)"
+   rm -r ${XAPIAN_PATH}
+   notmuch new
+   test_expect_equal "$(xapian-metadata get ${XAPIAN_PATH} version)" 3
+
    case $config in
        XDG*)
 	   test_begin_subtest "Set shadowed config value in database ($config)"
-- 
2.35.2

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

Thread: