test: add known broken test for n_d_get_default_indexopts

Xapian exceptions are swallowed and turned into default return value.
This commit is contained in:
David Bremner 2020-07-19 10:11:13 -03:00
parent b268c8c071
commit 24cf4381b8

View file

@ -372,4 +372,21 @@ Error: A Xapian exception occurred setting metadata: Database has been closed
EOF
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "get indexopts from closed database"
test_subtest_known_broken
cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
{
notmuch_indexopts_t *result;
EXPECT0(notmuch_database_close (db));
result = notmuch_database_get_default_indexopts (db);
printf("%d\n", result == NULL);
}
EOF
cat <<EOF > EXPECTED
== stdout ==
1
== stderr ==
EOF
test_expect_equal_file EXPECTED OUTPUT
test_done