]> git.notmuchmail.org Git - notmuch/commitdiff
test: destroy thread from closed database
authorDavid Bremner <david@tethera.net>
Fri, 24 Jul 2020 11:14:06 +0000 (08:14 -0300)
committerDavid Bremner <david@tethera.net>
Fri, 31 Jul 2020 10:41:00 +0000 (07:41 -0300)
Check for (non)-crash.

test/T568-lib-thread.sh

index 82e4ecb81b7a189cd0d9b7c051358e6a41363ac2..66066854eb832cfb3f7183a413c134fb0ea13516 100755 (executable)
@@ -285,5 +285,19 @@ unread
 EOF
 test_expect_equal_file EXPECTED OUTPUT
 
+test_begin_subtest "destroy thread with closed database"
+cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
+    {
+        time_t stamp;
+        notmuch_thread_destroy (thread);
+        printf("SUCCESS\n");
+    }
+EOF
+cat <<EOF > EXPECTED
+== stdout ==
+SUCCESS
+== stderr ==
+EOF
+test_expect_equal_file EXPECTED OUTPUT
 
 test_done