X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=test%2FT563-lib-directory.sh;fp=test%2FT563-lib-directory.sh;h=d71c884d5c355b3e167b84a0227cfcc76478cb97;hb=3890d989665f5906fa82a10f1a57157c7b23503c;hp=5e7da6761c3d2373cea550be26182938cf7d1870;hpb=9668583a49e9fe2e39844ceaab20779c9444ba8f;p=notmuch diff --git a/test/T563-lib-directory.sh b/test/T563-lib-directory.sh index 5e7da676..d71c884d 100755 --- a/test/T563-lib-directory.sh +++ b/test/T563-lib-directory.sh @@ -57,4 +57,22 @@ A Xapian exception occurred at lib/directory.cc:XXX: Database has been closed EOF test_expect_equal_file EXPECTED OUTPUT +test_begin_subtest "get child filenames for a closed db" +test_subtest_known_broken +cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} + { + notmuch_filenames_t *children; + children = notmuch_directory_get_child_files (dir); + printf ("%d\n", children == NULL); + stat = NOTMUCH_STATUS_XAPIAN_EXCEPTION; + } +EOF +cat < EXPECTED +== stdout == +1 +== stderr == +A Xapian exception occurred at lib/directory.cc:XXX: Database has been closed +EOF +test_expect_equal_file EXPECTED OUTPUT + test_done