]> git.notmuchmail.org Git - notmuch/blobdiff - test/T568-lib-thread.sh
test: regression test for n_thread_get_tags
[notmuch] / test / T568-lib-thread.sh
index 3eb28f3b5be668763189461ac924d85f164a39e2..82e4ecb81b7a189cd0d9b7c051358e6a41363ac2 100755 (executable)
@@ -262,5 +262,28 @@ cat <<EOF > EXPECTED
 EOF
 test_expect_equal_file EXPECTED OUTPUT
 
+test_begin_subtest "iterate tags from closed database"
+cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
+    {
+      notmuch_tags_t *tags;
+      const char *tag;
+      for (tags = notmuch_thread_get_tags (thread);
+           notmuch_tags_valid (tags);
+           notmuch_tags_move_to_next (tags))
+        {
+          tag = notmuch_tags_get (tags);
+          printf ("%s\n", tag);
+        }
+    }
+EOF
+cat <<EOF > EXPECTED
+== stdout ==
+inbox
+signed
+unread
+== stderr ==
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
 
 test_done