[PATCH] Repeatability when copying a whole directory into a new one.

Subject: [PATCH] Repeatability when copying a whole directory into a new one.

Date: Fri, 30 Sep 2011 01:26:46 +0200

To: notmuch@notmuchmail.org

Cc: Thomas Schwinge

From: Thomas Schwinge


This new test currently fails -- but it shouldn't.
---

Hi!

I found this while manually copying directories and running notmuch new.

Am I just too sleepy at this time, or is it another DB vs. directory
mtime issue?

     BROKEN Repeatability when copying a whole directory into a new one
            --- new.18.expected     2011-09-29 23:23:39.000000000 +0000
            +++ new.18.output       2011-09-29 23:23:39.000000000 +0000
            @@ -1,2 +1 @@
            -Processed 51 total files in almost no time.
             No new mail.


Grüße,
 Thomas

---
 test/new |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/test/new b/test/new
index 49f390d..0afb04c 100755
--- a/test/new
+++ b/test/new
@@ -153,4 +153,25 @@ rm -rf "${MAIL_DIR}"/two
 output=$(NOTMUCH_NEW)
 test_expect_equal "$output" "No new mail. Removed 3 messages."
 
+
+test_begin_subtest 'Repeatability when copying a whole directory into a new one'
+
+add_email_corpus
+
+mkdir "$MAIL_DIR"/2nd
+cp -a "$MAIL_DIR"/cur "$MAIL_DIR"/2nd/
+output1=$(notmuch new)
+
+rm -rf "$MAIL_DIR"/2nd
+notmuch new > /dev/null
+
+# This was quite enjoyable.  Let's do it again.
+mkdir "$MAIL_DIR"/2nd
+cp -a "$MAIL_DIR"/cur "$MAIL_DIR"/2nd/
+output2=$(notmuch new)
+
+test_subtest_known_broken
+test_expect_equal "$output2" "$output1"
+
+
 test_done
-- 
1.7.5.4


Thread: