diff options
| author | David Bremner <david@tethera.net> | 2022-05-25 07:51:16 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2022-06-25 16:06:18 -0300 |
| commit | 3f27cce71f9f154cb0c2134c32d41c31eb62a239 (patch) | |
| tree | 885c88706efdd7a771944287e4c2c27cfe737e11 /test/T566-lib-message.sh | |
| parent | 7e654e2a456c552052e9e50b83da73b4d31d8f2b (diff) | |
lib: add NOTMUCH_STATUS_CLOSED_DATABASE, use in _n_d_ensure_writable
In order for a database to actually be writeable, it must be the case that it
is open, not just the correct type of Xapian object. By explicitely
checking, we are able to provide better error reporting, in particular
for the previously broken test in T566-lib-message.
Diffstat (limited to 'test/T566-lib-message.sh')
| -rwxr-xr-x | test/T566-lib-message.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/T566-lib-message.sh b/test/T566-lib-message.sh index a98224c9..87e70441 100755 --- a/test/T566-lib-message.sh +++ b/test/T566-lib-message.sh @@ -231,7 +231,7 @@ cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} { notmuch_status_t status; status = notmuch_message_add_tag (message, "boom"); - printf("%d\n%d\n", message != NULL, status == NOTMUCH_STATUS_XAPIAN_EXCEPTION); + printf("%d\n%d\n", message != NULL, status == NOTMUCH_STATUS_CLOSED_DATABASE); } EOF cat <<EOF > EXPECTED @@ -247,7 +247,7 @@ cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} { notmuch_status_t status; status = notmuch_message_remove_tag (message, "boom"); - printf("%d\n%d\n", message != NULL, status == NOTMUCH_STATUS_XAPIAN_EXCEPTION); + printf("%d\n%d\n", message != NULL, status == NOTMUCH_STATUS_CLOSED_DATABASE); } EOF cat <<EOF > EXPECTED @@ -427,7 +427,7 @@ cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} { notmuch_status_t status; status = notmuch_message_remove_all_tags (message); - printf("%d\n%d\n", message != NULL, status == NOTMUCH_STATUS_XAPIAN_EXCEPTION); + printf("%d\n%d\n", message != NULL, status == NOTMUCH_STATUS_CLOSED_DATABASE); } EOF cat <<EOF > EXPECTED @@ -443,7 +443,7 @@ cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} { notmuch_status_t status; status = notmuch_message_freeze (message); - printf("%d\n%d\n", message != NULL, status == NOTMUCH_STATUS_SUCCESS); + printf("%d\n%d\n", message != NULL, status == NOTMUCH_STATUS_CLOSED_DATABASE); } EOF cat <<EOF > EXPECTED @@ -459,7 +459,7 @@ cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} { notmuch_status_t status; status = notmuch_message_thaw (message); - printf("%d\n%d\n", message != NULL, status == NOTMUCH_STATUS_UNBALANCED_FREEZE_THAW); + printf("%d\n%d\n", message != NULL, status == NOTMUCH_STATUS_CLOSED_DATABASE); } EOF cat <<EOF > EXPECTED |
