This is actually one of the few potentially useful things you can do with a message belonging to a closed database, since in principle you could re-open the database. --- test/T560-lib-error.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
diff --git a/test/T560-lib-error.sh b/test/T560-lib-error.sh index 371b0f9e..ef279e77 100755 --- a/test/T560-lib-error.sh +++ b/test/T560-lib-error.sh @@ -662,4 +662,20 @@ cat <<EOF > EXPECTED EOF test_expect_equal_file EXPECTED OUTPUT +test_begin_subtest "Handle retrieving closed db from message" +cat c_head2 - c_tail <<'EOF' | test_C ${MAIL_DIR} + { + notmuch_database_t *db2; + db2 = notmuch_message_get_database (message); + printf("%d\n%d\n", message != NULL, db == db2); + } +EOF +cat <<EOF > EXPECTED +== stdout == +1 +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-le...@notmuchmail.org