test: add known broken test for n_m_get_thread_id on closed db
authorDavid Bremner <david@tethera.net>
Tue, 30 Jun 2020 01:14:10 +0000 (22:14 -0300)
committerDavid Bremner <david@tethera.net>
Sat, 4 Jul 2020 00:04:02 +0000 (21:04 -0300)
This will be fixed in the next commit.

test/T560-lib-error.sh

index 5a5f66b8c193073d26a739b2a13691da6dc3af52..b5600851640d980e8c29ee644dc955e682cef37d 100755 (executable)
@@ -358,4 +358,22 @@ cat <<EOF > EXPECTED
 EOF
 test_expect_equal_file EXPECTED OUTPUT
 
+backup_database
+test_begin_subtest "Handle getting thread-id from closed database"
+test_subtest_known_broken
+cat c_head2 - c_tail <<'EOF' | test_C ${MAIL_DIR}
+    {
+        const char *id2;
+        id2=notmuch_message_get_thread_id (message);
+        printf("%s\n%d\n", id, id2==NULL);
+    }
+EOF
+cat <<EOF > EXPECTED
+== stdout ==
+1258471718-6781-1-git-send-email-dottedmag@dottedmag.net
+1
+== stderr ==
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
 test_done