mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 18:38:08 +01:00
test: regression test for notmuch_query_destroy
As with other void API entries, not crashing counts as success.
This commit is contained in:
parent
451c0ce3fc
commit
46468baa5a
1 changed files with 20 additions and 0 deletions
|
@ -231,4 +231,24 @@ Query string was: id:1258471718-6781-1-git-send-email-dottedmag@dottedmag.net
|
|||
EOF
|
||||
test_expect_equal_file EXPECTED OUTPUT
|
||||
|
||||
test_begin_subtest "destroy query with closed db"
|
||||
cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
|
||||
{
|
||||
notmuch_query_t *query;
|
||||
const char *str = "id:1258471718-6781-1-git-send-email-dottedmag@dottedmag.net";
|
||||
|
||||
query = notmuch_query_create (db, str);
|
||||
EXPECT0(notmuch_database_close (db));
|
||||
notmuch_query_destroy (query);
|
||||
|
||||
printf("SUCCESS\n");
|
||||
}
|
||||
EOF
|
||||
cat <<EOF > EXPECTED
|
||||
== stdout ==
|
||||
SUCCESS
|
||||
== stderr ==
|
||||
EOF
|
||||
test_expect_equal_file EXPECTED OUTPUT
|
||||
|
||||
test_done
|
||||
|
|
Loading…
Reference in a new issue