unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: notmuch@notmuchmail.org
Subject: [PATCH 3/4] test: add known broken test for n_m_get_thread_id on closed db
Date: Mon, 29 Jun 2020 22:14:10 -0300	[thread overview]
Message-ID: <20200630011411.612552-4-david@tethera.net> (raw)
In-Reply-To: <20200630011411.612552-1-david@tethera.net>

This will be fixed in the next commit.
---
 test/T560-lib-error.sh | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/test/T560-lib-error.sh b/test/T560-lib-error.sh
index 5a5f66b8..b5600851 100755
--- a/test/T560-lib-error.sh
+++ b/test/T560-lib-error.sh
@@ -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
-- 
2.27.0

  parent reply	other threads:[~2020-06-30 12:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-30  1:14 introduce exception handling at top level of libnotmuch David Bremner
2020-06-30  1:14 ` [PATCH 1/4] test: add known broken test for error handling on closed database David Bremner
2020-06-30  1:14 ` [PATCH 2/4] lib: catch error from closed db in n_m_get_message_id David Bremner
2020-07-04 15:44   ` Floris Bruynooghe
2020-07-04 17:17     ` David Bremner
2020-07-05 11:17       ` David Bremner
2020-07-08 19:55         ` Floris Bruynooghe
2020-07-08 19:52       ` Floris Bruynooghe
2020-06-30  1:14 ` David Bremner [this message]
2020-06-30  1:14 ` [PATCH 4/4] lib/message: catch exception in n_m_get_thread_id David Bremner
2020-07-02 19:16 ` introduce exception handling at top level of libnotmuch Daniel Kahn Gillmor
2020-07-04  0:15   ` David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200630011411.612552-4-david@tethera.net \
    --to=david@tethera.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).