This function only accesses data cached by notmuch, so being closed is
not a problem.
---
test/T562-lib-database.sh | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/test/T562-lib-database.sh b/test/T562-lib-database.sh
index 94e0e06a..e9f00726 100755
--- a/test/T562-lib-database.sh
+++ b/test/T562-lib-database.sh
@@ -196,4 +196,22 @@ cat <<EOF > EXPECTED
EOF
test_expect_equal_file EXPECTED OUTPUT
+test_begin_subtest "get revision for a closed db"
+cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
+ {
+ const char *uuid;
+ unsigned long rev;
+
+ EXPECT0(notmuch_database_close (db));
+ rev = notmuch_database_get_revision (db, &uuid);
+ printf ("%d\n", rev, uuid);
+ }
+EOF
+cat <<EOF > EXPECTED
+== stdout ==
+53
+== stderr ==
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
test_done
--
2.27.0
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org