X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;ds=sidebyside;f=test%2FT560-lib-error.sh;h=84ea6ccfab26026dcb96eb0a9b0ee551d92aadac;hb=b7572ceb143773a988a4852ac3b7c85254009d0e;hp=ebace888681c3d807517e647ec8b5f7384c000e9;hpb=aa8e3f4487897f0c650dc37d99153099c3d3df5e;p=notmuch diff --git a/test/T560-lib-error.sh b/test/T560-lib-error.sh index ebace888..84ea6ccf 100755 --- a/test/T560-lib-error.sh +++ b/test/T560-lib-error.sh @@ -438,7 +438,6 @@ EOF test_expect_equal_file EXPECTED OUTPUT test_begin_subtest "Handle getting ghost flag from closed database" -test_subtest_known_broken cat c_head2 - c_tail <<'EOF' | test_C ${MAIL_DIR} { notmuch_bool_t result; @@ -534,4 +533,37 @@ cat < EXPECTED EOF test_expect_equal_file EXPECTED OUTPUT +test_begin_subtest "Handle read maildir flag with closed database" +cat c_head2 - c_tail <<'EOF' | test_C ${MAIL_DIR} + { + notmuch_bool_t is_set = -1; + is_set = notmuch_message_has_maildir_flag (message, 'S'); + printf("%d\n%d\n", message != NULL, is_set == FALSE || is_set == TRUE); + } +EOF +cat < EXPECTED +== stdout == +1 +1 +== stderr == +EOF +test_expect_equal_file EXPECTED OUTPUT + +test_begin_subtest "Handle checking maildir flag with closed db (new API)" +cat c_head2 - c_tail <<'EOF' | test_C ${MAIL_DIR} + { + notmuch_status_t status; + notmuch_bool_t out; + status = notmuch_message_has_maildir_flag_st (message, 'S', &out); + printf("%d\n%d\n", message != NULL, status == NOTMUCH_STATUS_XAPIAN_EXCEPTION); + } +EOF +cat < EXPECTED +== stdout == +1 +1 +== stderr == +EOF +test_expect_equal_file EXPECTED OUTPUT + test_done