mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-28 05:34:11 +01:00
test: add regression test for n_q_add_tag_exclude
This relies on the change to not tear down the auxilary Xapian objects, in particular the query parser, when the database is closed.
This commit is contained in:
parent
d5c84c8289
commit
4130b4e514
1 changed files with 19 additions and 0 deletions
|
@ -120,4 +120,23 @@ cat <<EOF > EXPECTED
|
|||
EOF
|
||||
test_expect_equal_file EXPECTED OUTPUT
|
||||
|
||||
test_begin_subtest "add tag_exclude on 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));
|
||||
stat = notmuch_query_add_tag_exclude (query, "spam");
|
||||
printf("%d\n", stat == NOTMUCH_STATUS_SUCCESS);
|
||||
}
|
||||
EOF
|
||||
cat <<EOF > EXPECTED
|
||||
== stdout ==
|
||||
1
|
||||
== stderr ==
|
||||
EOF
|
||||
test_expect_equal_file EXPECTED OUTPUT
|
||||
|
||||
test_done
|
||||
|
|
Loading…
Reference in a new issue