unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Austin Clements <amdragon@MIT.EDU>
To: notmuch@notmuchmail.org
Subject: [PATCH v4 1/4] test: Test notmuch new with a broken symlink
Date: Thu, 24 May 2012 18:01:10 -0400	[thread overview]
Message-ID: <1337896873-23253-2-git-send-email-amdragon@mit.edu> (raw)
In-Reply-To: <1337896873-23253-1-git-send-email-amdragon@mit.edu>

---
 test/new |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/test/new b/test/new
index 99f9913..a7bc146 100755
--- a/test/new
+++ b/test/new
@@ -136,6 +136,16 @@ output=$(NOTMUCH_NEW)
 test_expect_equal "$output" "Added 1 new message to the database."
 
 
+test_begin_subtest "Broken symlink aborts"
+ln -s does-not-exist "${MAIL_DIR}/broken"
+output=$(NOTMUCH_NEW 2>&1)
+test_expect_equal "$output" \
+"Error reading directory ${MAIL_DIR}/broken: No such file or directory
+Note: A fatal error was encountered: Something went wrong trying to read or write a file
+No new mail."
+rm "${MAIL_DIR}/broken"
+
+
 test_begin_subtest "New two-level directory"
 
 generate_message [dir]=two/levels
-- 
1.7.10

  reply	other threads:[~2012-05-24 22:01 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-07 18:09 [PATCH 0/2] Better, more portable stat-ing logic for notmuch new Austin Clements
2012-05-07 18:09 ` [PATCH 1/2] test: Test notmuch new with a broken symlink Austin Clements
2012-05-07 18:09 ` [PATCH 2/2] new: Centralize file type stat-ing logic Austin Clements
2012-05-07 21:08   ` Jani Nikula
2012-05-07 21:14     ` Jani Nikula
2012-05-07 22:18     ` Austin Clements
2012-05-07 22:20 ` [PATCH v2 0/2] Better, more portable stat-ing logic for notmuch new Austin Clements
2012-05-07 22:20   ` [PATCH v2 1/2] test: Test notmuch new with a broken symlink Austin Clements
2012-05-07 22:20   ` [PATCH v2 2/2] new: Centralize file type stat-ing logic Austin Clements
2012-05-08  7:58     ` Jani Nikula
2012-05-08  8:33       ` Jani Nikula
2012-05-09 18:27         ` Austin Clements
2012-05-09 18:45   ` [PATCH v2 0/2] Better, more portable stat-ing logic for notmuch new Austin Clements
2012-05-24 19:31   ` [PATCH v3 0/4] " Austin Clements
2012-05-24 19:31     ` [PATCH v3 1/4] test: Test notmuch new with a broken symlink Austin Clements
2012-05-24 19:32     ` [PATCH v3 2/4] new: Centralize file type stat-ing logic Austin Clements
2012-05-24 19:32     ` [PATCH v3 3/4] new: Merge error checks from add_files and add_files_recursive Austin Clements
2012-05-24 20:57       ` Jani Nikula
2012-05-24 21:57         ` Austin Clements
2012-05-24 20:57       ` Jani Nikula
2012-05-24 21:08         ` Jani Nikula
2012-05-24 21:44           ` Jameson Graef Rollins
2012-05-24 19:32     ` [PATCH v3 4/4] new: Unify " Austin Clements
2012-05-24 22:01     ` [PATCH v4 0/4] Better, more portable stat-ing logic for notmuch new Austin Clements
2012-05-24 22:01       ` Austin Clements [this message]
2012-05-25  1:03         ` [PATCH v4 1/4] test: Test notmuch new with a broken symlink David Bremner
2012-05-24 22:01       ` [PATCH v4 2/4] new: Centralize file type stat-ing logic Austin Clements
2012-05-24 22:01       ` [PATCH v4 3/4] new: Merge error checks from add_files and add_files_recursive Austin Clements
2012-05-24 22:01       ` [PATCH v4 4/4] new: Unify " Austin Clements

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=1337896873-23253-2-git-send-email-amdragon@mit.edu \
    --to=amdragon@mit.edu \
    --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).