summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJani Nikula <jani@nikula.org>2015-09-25 23:48:46 +0300
committerDavid Bremner <david@tethera.net>2015-10-14 07:55:41 -0300
commite26d99dc7b02f33299c281f97a13deaef802bc7a (patch)
tree9b783507b3a2588cbf5bcf0fd6d00f100a55db10 /test
parent727fcd18c6a3897622582e71a2d71081e3ae40ea (diff)
cli: delete directory documents on directory removal0.21_rc0
There was a problem with the directory documents being left behind when the filesystem directory was removed. This was worked around in [1]. However, that ignored the fact that the directory documents are also still listed by notmuch_directory_get_child_directories() leading to confusing results when running notmuch new. The directory documents are found and queued for removal over and over again. Fix the problem for real by removing the directory documents. This fixes the tests flagged as broken in [2]. The (non-deterministic) hack test from [3] also still passes with this change. [1] commit acd66cdec075312944e527febd46382e54d99367 [2] commit ed9ceda623d3f22fb66365b33db63c5c982067d3 [3] id:1441445731-4362-1-git-send-email-jani@nikula.org
Diffstat (limited to 'test')
-rwxr-xr-xtest/T050-new.sh6
1 files changed, 0 insertions, 6 deletions
diff --git a/test/T050-new.sh b/test/T050-new.sh
index 33ce1ab9..81cf2fad 100755
--- a/test/T050-new.sh
+++ b/test/T050-new.sh
@@ -93,7 +93,6 @@ No new mail. Detected 3 file renames."
test_begin_subtest "Deleted directory"
-test_subtest_known_broken
rm -rf "${MAIL_DIR}"/dir-renamed
output=$(NOTMUCH_NEW --debug)
@@ -102,7 +101,6 @@ No new mail. Removed 3 messages."
test_begin_subtest "New directory (at end of list)"
-test_subtest_known_broken
generate_message [dir]=zzz
generate_message [dir]=zzz
@@ -114,7 +112,6 @@ test_expect_equal "$output" "Added 3 new messages to the database."
test_begin_subtest "Deleted directory (end of list)"
-test_subtest_known_broken
rm -rf "${MAIL_DIR}"/zzz
output=$(NOTMUCH_NEW --debug)
@@ -173,7 +170,6 @@ test_expect_equal "$output" "(D) add_files_recursive, pass 3: queuing leftover d
No new mail. Removed 3 messages."
test_begin_subtest "Support single-message mbox"
-test_subtest_known_broken
cat > "${MAIL_DIR}"/mbox_file1 <<EOF
From test_suite@notmuchmail.org Fri Jan 5 15:43:57 2001
From: Notmuch Test Suite <test_suite@notmuchmail.org>
@@ -187,7 +183,6 @@ test_expect_equal "$output" "Added 1 new message to the database."
# 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
@@ -224,7 +219,6 @@ output=$(NOTMUCH_NEW 2>&1)
test_expect_equal "$output" "Added 1 new message to the database."
test_begin_subtest "Ignore files and directories specified in new.ignore (multiple occurrences)"
-test_subtest_known_broken
notmuch config set new.ignore .git ignored_file .ignored_hidden_file
notmuch new > /dev/null # ensure that files/folders will be printed in ASCII order.
touch "${MAIL_DIR}"/.git # change .git's mtime for notmuch new to rescan.