Xapian exceptions seem to handled OK, at least for this case. --- test/T562-lib-database.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
diff --git a/test/T562-lib-database.sh b/test/T562-lib-database.sh index bb454ea5..20b7eca6 100755 --- a/test/T562-lib-database.sh +++ b/test/T562-lib-database.sh @@ -331,4 +331,20 @@ cat <<EOF > EXPECTED EOF test_expect_equal_file EXPECTED OUTPUT +test_begin_subtest "get config from closed database" +cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} + { + const char *result; + EXPECT0(notmuch_database_close (db)); + stat = notmuch_database_get_config (db, "foo", &result); + printf("%d\n", stat == NOTMUCH_STATUS_XAPIAN_EXCEPTION); + } +EOF +cat <<EOF > EXPECTED +== stdout == +1 +== stderr == +Error: A Xapian exception occurred getting metadata: Database has been closed +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-le...@notmuchmail.org