unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org
Subject: [PATCH 1/2] test/new: add known broken test for missing xapian directory.
Date: Sat, 25 Dec 2021 17:22:55 -0400	[thread overview]
Message-ID: <20211225212256.3302545-1-david@tethera.net> (raw)
In-Reply-To: <87a6h3xsir.fsf@tethera.net>

`notmuch new' should go ahead and create the xapian database if it is
missing, even in the case where the parent .notmuch (or equivalent)
directory exists.
---
 test/T055-path-config.sh | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/test/T055-path-config.sh b/test/T055-path-config.sh
index f0ce55da..374aea3b 100755
--- a/test/T055-path-config.sh
+++ b/test/T055-path-config.sh
@@ -318,7 +318,15 @@ to=m.header('To')
 print(to)
 EOF
 	   test_expect_equal_file EXPECTED OUTPUT
-	   ;& # fall through
+	   ;;
+       *)
+	   backup_database
+	   test_begin_subtest ".notmuch without xapian/ handled gracefully ($config)"
+	   test_subtest_known_broken
+	   rm -r $XAPIAN_PATH
+	   test_expect_success "notmuch new"
+	   restore_database
+	   ;;
    esac
 
    case $config in
-- 
2.34.1

  reply	other threads:[~2021-12-25 21:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-14 12:47 [bug] handle .notmuch without xapian/ more gracefully David Bremner
2021-12-25 21:22 ` David Bremner [this message]
2021-12-25 21:22   ` [PATCH 2/2] lib/open: do not consider .notmuch alone as an existing database David Bremner
2021-12-29 17:48     ` Tomi Ollila
2021-12-29 18:27       ` 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=20211225212256.3302545-1-david@tethera.net \
    --to=david@tethera.net \
    --cc=notmuch@notmuchmail.org \
    --subject='Re: [PATCH 1/2] test/new: add known broken test for missing xapian directory.' \
    /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

Code repositories for project(s) associated with this inbox:

	notmuch.git.git (no URL configured)

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).