]> git.notmuchmail.org Git - notmuch/commitdiff
test: regression test for set_omit_excluded
authorDavid Bremner <david@tethera.net>
Wed, 22 Jul 2020 10:51:21 +0000 (07:51 -0300)
committerDavid Bremner <david@tethera.net>
Wed, 29 Jul 2020 15:19:48 +0000 (12:19 -0300)
test/T564-lib-query.sh

index ac08344fffddfb17ee2e25906abedb425353b6cf..ea176191e5d4e29a3c03d855ca46397fe2f6dd32 100755 (executable)
@@ -79,4 +79,24 @@ cat <<EOF > 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 <<EOF > EXPECTED
+== stdout ==
+SUCCESS
+== stderr ==
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
 test_done