mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-29 06:04:11 +01:00
test: add regression test for n_d_get_config
Xapian exceptions seem to handled OK, at least for this case.
This commit is contained in:
parent
dfab190a40
commit
a5e13d5218
1 changed files with 16 additions and 0 deletions
|
@ -339,4 +339,20 @@ A Xapian exception occurred getting tags: Database has been closed.
|
||||||
EOF
|
EOF
|
||||||
test_expect_equal_file EXPECTED OUTPUT
|
test_expect_equal_file EXPECTED OUTPUT
|
||||||
|
|
||||||
|
test_begin_subtest "get config from closed database"
|
||||||
|
cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
|
||||||
|
{
|
||||||
|
const char *result;
|
||||||
|
EXPECT0(notmuch_database_close (db));
|
||||||
|
stat = notmuch_database_get_config (db, "foo", &result);
|
||||||
|
printf("%d\n", stat == NOTMUCH_STATUS_XAPIAN_EXCEPTION);
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
cat <<EOF > EXPECTED
|
||||||
|
== stdout ==
|
||||||
|
1
|
||||||
|
== stderr ==
|
||||||
|
Error: A Xapian exception occurred getting metadata: Database has been closed
|
||||||
|
EOF
|
||||||
|
test_expect_equal_file EXPECTED OUTPUT
|
||||||
test_done
|
test_done
|
||||||
|
|
Loading…
Reference in a new issue