[PATCH] Additional maildir-sync test

Michal Sojka sojkam1 at fel.cvut.cz
Sat Nov 20 15:54:20 PST 2010


On Sat, 20 Nov 2010, Michal Sojka wrote:
> your patch fixes the problem, but it also breaks one of the tests in
> test suite. I created the test for your patch ...

and here is another test which was in my original synchronization
patches, but Carl decided to remove it. It checks that tagging message
by an unrelated tag does not move the message from new to cur. This test
currently fails.

In id:"20100323143714.GE28596 at blackspot" Ruben wrote that for some mail
readers there is a difference between mails in new and mails without "S"
flag in cur.

Ruben, is the current behavior problematic for you?

Carl, did you have some reason to remove this functionality?

-Michal

diff --git a/test/maildir-sync b/test/maildir-sync
index 4419a7e..8da12dd 100755
--- a/test/maildir-sync
+++ b/test/maildir-sync
@@ -185,4 +185,10 @@ add_message [subject]='"Message in new without maildir info"' [date]='"Sat, 01 J
 output=$(notmuch search subject:"Message in new without maildir info" | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; Message in new without maildir info (inbox unread)"
 
+test_begin_subtest "Non-maildir-syncable tag should not move the message from new"
+add_message [subject]='"Message to stay in new after tagging"' [date]='"Sat, 01 Jan 2000 12:00:00 -0000"' [filename]='message-to-stay-in-new-after-tagging' [dir]=new
+notmuch tag +non-maildir-syncable subject:"Message to stay in new after tagging"
+output=$(cd "$MAIL_DIR"; find -name 'message-to-stay-in-new-after-tagging*')
+test_expect_equal "$output" "./new/message-to-stay-in-new-after-tagging"
+
 test_done


More information about the notmuch mailing list