From a292461e65c2150b02fc6f9b168dc871b46d44a1 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Wed, 22 Jul 2020 07:51:21 -0300 Subject: [PATCH] test: regression test for set_omit_excluded --- test/T564-lib-query.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/test/T564-lib-query.sh b/test/T564-lib-query.sh index ac08344f..ea176191 100755 --- a/test/T564-lib-query.sh +++ b/test/T564-lib-query.sh @@ -79,4 +79,24 @@ cat < EXPECTED EOF test_expect_equal_file EXPECTED OUTPUT +test_begin_subtest "set omit_excluded 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)); + notmuch_query_set_omit_excluded (query, NOTMUCH_EXCLUDE_ALL); + + printf("SUCCESS\n"); + } +EOF +cat < EXPECTED +== stdout == +SUCCESS +== stderr == +EOF +test_expect_equal_file EXPECTED OUTPUT + test_done