aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Austin Clements <amdragon@MIT.EDU>2012-11-25 01:16:00 -0500
committerGravatar David Bremner <bremner@debian.org>2012-11-26 21:10:11 -0400
commit079f5a138b685bb33bee86c0ed5b8d17f58b09af (patch)
treedc492e0403044cc9b5d0dd26bba74b91209a0a11
parentde9875ca8335dffa0e2d4efd06eadb104c84f95b (diff)
test: Test for ignoring multi-message mbox
This test is currently broken. Note that its brokenness cascades and causes the next test to fail as well (because notmuch incorrectly indexes the mbox file).
-rwxr-xr-xtest/new18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/new b/test/new
index 43d56e40..29f9affc 100755
--- a/test/new
+++ b/test/new
@@ -178,16 +178,34 @@ test_expect_equal "$output" \
# This test requires that notmuch new has been run at least once.
test_begin_subtest "Skip and report non-mail files"
+test_subtest_known_broken
generate_message
mkdir -p "${MAIL_DIR}"/.git && touch "${MAIL_DIR}"/.git/config
touch "${MAIL_DIR}"/ignored_file
touch "${MAIL_DIR}"/.ignored_hidden_file
+cat > "${MAIL_DIR}"/mbox_file <<EOF
+From test_suite@notmuchmail.org Fri Jan 5 15:43:57 2001
+From: Notmuch Test Suite <test_suite@notmuchmail.org>
+To: Notmuch Test Suite <test_suite@notmuchmail.org>
+Subject: Test mbox message 1
+
+Body.
+
+From test_suite@notmuchmail.org Fri Jan 5 15:43:57 2001
+From: Notmuch Test Suite <test_suite@notmuchmail.org>
+To: Notmuch Test Suite <test_suite@notmuchmail.org>
+Subject: Test mbox message 2
+
+Body 2.
+EOF
output=$(NOTMUCH_NEW 2>&1)
test_expect_equal "$output" \
"Note: Ignoring non-mail file: ${MAIL_DIR}/.git/config
Note: Ignoring non-mail file: ${MAIL_DIR}/.ignored_hidden_file
Note: Ignoring non-mail file: ${MAIL_DIR}/ignored_file
+Note: Ignoring non-mail file: ${MAIL_DIR}/mbox_file
Added 1 new message to the database."
+rm "${MAIL_DIR}"/mbox_file
test_begin_subtest "Ignore files and directories specified in new.ignore"
generate_message