Xapian exceptions are swallowed and turned into default return value.
---
test/T562-lib-database.sh | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/test/T562-lib-database.sh b/test/T562-lib-database.sh
index 81d5c540..a3ecd9ba 100755
--- a/test/T562-lib-database.sh
+++ b/test/T562-lib-database.sh
@@ -364,4 +364,21 @@ Error: A Xapian exception occurred setting metadata: Database has been closed
EOF
test_expect_equal_file EXPECTED OUTPUT
+test_begin_subtest "get indexopts from closed database"
+test_subtest_known_broken
+cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
+ {
+ notmuch_indexopts_t *result;
+ EXPECT0(notmuch_database_close (db));
+ result = notmuch_database_get_default_indexopts (db);
+ printf("%d\n", result == NULL);
+ }
+EOF
+cat <<EOF > EXPECTED
+== stdout ==
+1
+== 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