diff options
| author | David Bremner <david@tethera.net> | 2020-07-22 07:51:23 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2020-07-29 12:20:06 -0300 |
| commit | 4130b4e514e9ad16b420db2736f9cbb79d829fa9 (patch) | |
| tree | 76c9db0205d92be3c4d9cdc53fd6b66bccbdcdfb /test/T564-lib-query.sh | |
| parent | d5c84c8289ff57e5ea5745f126f9c0377cb8f413 (diff) | |
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.
Diffstat (limited to 'test/T564-lib-query.sh')
| -rwxr-xr-x | test/T564-lib-query.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/T564-lib-query.sh b/test/T564-lib-query.sh index 14e47cfb..a2f5d731 100755 --- a/test/T564-lib-query.sh +++ b/test/T564-lib-query.sh @@ -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 |
