mirror of
https://git.notmuchmail.org/git/notmuch
synced 2025-01-18 09:15:56 +01:00
test: regression test for n_d_get_config_list on closed db.
Exception is caught.
This commit is contained in:
parent
e8ffbf84ff
commit
a0b2a54aa7
1 changed files with 15 additions and 0 deletions
|
@ -61,6 +61,21 @@ valid = 0
|
||||||
EOF
|
EOF
|
||||||
test_expect_equal_file EXPECTED OUTPUT
|
test_expect_equal_file EXPECTED OUTPUT
|
||||||
|
|
||||||
|
test_begin_subtest "notmuch_database_get_config_list: closed db"
|
||||||
|
cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
|
||||||
|
{
|
||||||
|
notmuch_config_list_t *list;
|
||||||
|
EXPECT0(notmuch_database_close (db));
|
||||||
|
stat = notmuch_database_get_config_list (db, "nonexistent", &list);
|
||||||
|
printf("%d\n", stat == NOTMUCH_STATUS_XAPIAN_EXCEPTION);
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
cat <<'EOF' >EXPECTED
|
||||||
|
== stdout ==
|
||||||
|
1
|
||||||
|
== stderr ==
|
||||||
|
EOF
|
||||||
|
test_expect_equal_file EXPECTED OUTPUT
|
||||||
|
|
||||||
test_begin_subtest "notmuch_database_get_config_list: all pairs"
|
test_begin_subtest "notmuch_database_get_config_list: all pairs"
|
||||||
cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
|
cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
|
||||||
|
|
Loading…
Reference in a new issue