aboutsummaryrefslogtreecommitdiff
path: root/test/T562-lib-database.sh
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2020-07-19 07:13:06 -0300
committerDavid Bremner <david@tethera.net>2020-07-22 19:52:55 -0300
commit97c887282a6688323822137a21ea0bfc2344b5c9 (patch)
treea6028bd11be43cea6945ad037d414c009589ca2c /test/T562-lib-database.sh
parentc477d7ce311335fda16a15e624ca3931d79144cf (diff)
test: add known broken test for notmuch_database_remove_message
The current error message is a bit confusing; fix in next commit.
Diffstat (limited to 'test/T562-lib-database.sh')
-rwxr-xr-xtest/T562-lib-database.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/T562-lib-database.sh b/test/T562-lib-database.sh
index e64f0f12..75a31091 100755
--- a/test/T562-lib-database.sh
+++ b/test/T562-lib-database.sh
@@ -288,5 +288,21 @@ Error opening /dev/zero: path outside mail root
EOF
test_expect_equal_file EXPECTED OUTPUT
+test_begin_subtest "remove message file with a closed db"
+test_subtest_known_broken
+cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
+ {
+ EXPECT0(notmuch_database_close (db));
+ stat = notmuch_database_remove_message (db, "01:2,");
+ printf ("%d\n", stat == NOTMUCH_STATUS_XAPIAN_EXCEPTION);
+ }
+EOF
+cat <<EOF > EXPECTED
+== stdout ==
+1
+== stderr ==
+A Xapian exception occurred finding/creating a directory: Database has been closed.
+EOF
+test_expect_equal_file EXPECTED OUTPUT
test_done