mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-23 09:54:52 +01:00
test: regression test for n_d_upgrade
The logic is that if it's acceptable to return SUCCESS for read only database, it's acceptable for a closed one.
This commit is contained in:
parent
f25fc8e211
commit
3f121d636e
1 changed files with 17 additions and 0 deletions
|
@ -150,4 +150,21 @@ A Xapian exception occurred at lib/database.cc:XXX: Database has been closed
|
||||||
EOF
|
EOF
|
||||||
test_expect_equal_file EXPECTED OUTPUT
|
test_expect_equal_file EXPECTED OUTPUT
|
||||||
|
|
||||||
|
test_begin_subtest "upgrade a closed db"
|
||||||
|
cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
|
||||||
|
{
|
||||||
|
notmuch_bool_t ret;
|
||||||
|
|
||||||
|
EXPECT0(notmuch_database_close (db));
|
||||||
|
stat = notmuch_database_upgrade (db, NULL, NULL);
|
||||||
|
printf ("%d\n", ret == NOTMUCH_STATUS_SUCCESS);
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
cat <<EOF > EXPECTED
|
||||||
|
== stdout ==
|
||||||
|
1
|
||||||
|
== stderr ==
|
||||||
|
EOF
|
||||||
|
test_expect_equal_file EXPECTED OUTPUT
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
|
Loading…
Reference in a new issue