aboutsummaryrefslogtreecommitdiff
path: root/test/T560-lib-error.sh
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2020-07-04 09:09:09 -0300
committerDavid Bremner <david@tethera.net>2020-07-13 07:19:22 -0300
commita962bd2bf801b80e2bdfaa8b05797bf01bc3fc1f (patch)
tree69b06552b5c2ef5e4cdd6ced473f9513d3695783 /test/T560-lib-error.sh
parent056794a60d4f7c1f1d88d239e21f761f91cf03ce (diff)
lib/n_m_get_replies: doc return, initial regression test
We need to to set a query and retrieve the threads to meaningfully test this function.
Diffstat (limited to 'test/T560-lib-error.sh')
-rwxr-xr-xtest/T560-lib-error.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/T560-lib-error.sh b/test/T560-lib-error.sh
index 777eb375..d7caed5a 100755
--- a/test/T560-lib-error.sh
+++ b/test/T560-lib-error.sh
@@ -387,4 +387,22 @@ cat <<EOF > EXPECTED
EOF
test_expect_equal_file EXPECTED OUTPUT
+# XXX TODO: test on a message from notmuch_thread_get_toplevel_messages
+# XXX this test only tests the trivial code path
+test_begin_subtest "Handle getting replies from closed database"
+cat c_head2 - c_tail <<'EOF' | test_C ${MAIL_DIR}
+ {
+ notmuch_messages_t *replies;
+ replies = notmuch_message_get_replies (message);
+ printf("%d\n%d\n", message != NULL, replies==NULL);
+ }
+EOF
+cat <<EOF > EXPECTED
+== stdout ==
+1
+1
+== stderr ==
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
test_done