From 00f48f397abcdc662041726b25dac0173880f2e5 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Fri, 24 Jul 2020 08:14:06 -0300 Subject: [PATCH] test: destroy thread from closed database Check for (non)-crash. --- test/T568-lib-thread.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/T568-lib-thread.sh b/test/T568-lib-thread.sh index 82e4ecb8..66066854 100755 --- a/test/T568-lib-thread.sh +++ b/test/T568-lib-thread.sh @@ -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 < EXPECTED +== stdout == +SUCCESS +== stderr == +EOF +test_expect_equal_file EXPECTED OUTPUT test_done