diff options
| author | David Bremner <david@tethera.net> | 2020-08-01 09:25:58 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2020-08-03 20:57:43 -0300 |
| commit | b03cc6cf90c302b66453feb081b36fabe927a576 (patch) | |
| tree | 016c0515d57c41fcff5035b212de49b55f1d7d71 | |
| parent | 337665e26a4f0bb0e24a9160f45faf444032bf5d (diff) | |
test: known broken test for n_directory_delete with closed db.
There is a return value bug in notmuch_directory_delete that is hiding
the exception.
| -rwxr-xr-x | test/T563-lib-directory.sh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/test/T563-lib-directory.sh b/test/T563-lib-directory.sh index 61ed8add..b91a1c87 100755 --- a/test/T563-lib-directory.sh +++ b/test/T563-lib-directory.sh @@ -74,4 +74,40 @@ A Xapian exception occurred at lib/directory.cc:XXX: Database has been closed EOF test_expect_equal_file EXPECTED OUTPUT +backup_database +test_begin_subtest "delete directory document for a closed db" +test_subtest_known_broken +cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} + { + stat = notmuch_directory_delete (dir); + printf ("%d\n", stat == NOTMUCH_STATUS_XAPIAN_EXCEPTION); + } +EOF +cat <<EOF > EXPECTED +== stdout == +1 +== stderr == +A Xapian exception occurred deleting directory entry: Database has been closed. +EOF +test_expect_equal_file EXPECTED OUTPUT +restore_database + +backup_database +test_begin_subtest "get/set mtime of directory for a closed db" +cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} + { + time_t stamp = notmuch_directory_get_mtime (dir); + stat = notmuch_directory_set_mtime (dir, stamp); + printf ("%d\n", stat == NOTMUCH_STATUS_XAPIAN_EXCEPTION); + } +EOF +cat <<EOF > EXPECTED +== stdout == +1 +== stderr == +A Xapian exception occurred setting directory mtime: Database has been closed. +EOF +test_expect_equal_file EXPECTED OUTPUT +restore_database + test_done |
