X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=test%2FT560-lib-error.sh;h=815005365fd5c636dd6a3e3b6ff8b55f21cd6fc3;hb=5fbb2c7929196033b6787ab40f7d94ec89bfbbba;hp=5a5f66b8c193073d26a739b2a13691da6dc3af52;hpb=87d462a20423a25eaf4b54a90bfd538dd93da675;p=notmuch diff --git a/test/T560-lib-error.sh b/test/T560-lib-error.sh index 5a5f66b8..81500536 100755 --- a/test/T560-lib-error.sh +++ b/test/T560-lib-error.sh @@ -358,4 +358,21 @@ cat < EXPECTED EOF test_expect_equal_file EXPECTED OUTPUT +backup_database +test_begin_subtest "Handle getting thread-id from closed database" +cat c_head2 - c_tail <<'EOF' | test_C ${MAIL_DIR} + { + const char *id2; + id2=notmuch_message_get_thread_id (message); + printf("%s\n%d\n", id, id2==NULL); + } +EOF +cat < EXPECTED +== stdout == +1258471718-6781-1-git-send-email-dottedmag@dottedmag.net +1 +== stderr == +EOF +test_expect_equal_file EXPECTED OUTPUT + test_done