unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Michal Sojka <sojkam1@fel.cvut.cz>
To: notmuch@notmuchmail.org
Subject: [PATCH 2/3] test: Add some missing maildir synchronization tests
Date: Wed, 19 Dec 2012 22:32:26 +0100	[thread overview]
Message-ID: <1355952747-27350-3-git-send-email-sojkam1@fel.cvut.cz> (raw)
In-Reply-To: <1355952747-27350-1-git-send-email-sojkam1@fel.cvut.cz>

As mentioned by Jani Nikula in id:87vcccp4y3.fsf@nikula.org, some cases
of maildir synchronization are not covered by our tests. Let's add the
missing tests.
---
 test/maildir-sync |   12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/test/maildir-sync b/test/maildir-sync
index 6165782..b2ac89f 100755
--- a/test/maildir-sync
+++ b/test/maildir-sync
@@ -92,6 +92,18 @@ notmuch tag +donotmove subject:"Message to stay in new"
 output=$(cd "$MAIL_DIR"; ls */message-to-stay-in-new*)
 test_expect_equal "$output" "new/message-to-stay-in-new"
 
+test_begin_subtest "Message in cur lacking maildir info gets one on any tag change"
+add_message [filename]='message-to-get-maildir-info' [dir]=cur
+notmuch tag +anytag id:$gen_msg_id
+output=$(cd "$MAIL_DIR"; ls */message-to-get-maildir-info*)
+test_expect_equal "$output" "cur/message-to-get-maildir-info:2,"
+
+test_begin_subtest "Message in new with maildir info is moved to cur on any tag change"
+add_message [filename]='message-with-info-to-be-moved-to-cur:2,' [dir]=new
+notmuch tag +anytag id:$gen_msg_id
+output=$(cd "$MAIL_DIR"; ls */message-with-info-to-be-moved-to-cur*)
+test_expect_equal "$output" "cur/message-with-info-to-be-moved-to-cur:2,"
+
 test_begin_subtest "Removing 'S' flag from existing filename adds 'unread' tag"
 add_message [subject]='"Removing S flag"' [filename]='removing-s-flag:2,S' [dir]=cur
 output=$(notmuch search subject:"Removing S flag" | notmuch_search_sanitize)
-- 
1.7.10.4

  parent reply	other threads:[~2012-12-19 21:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-19 21:32 [PATCH 0/3] Adding non-maildir tags does not move message from new to cur Michal Sojka
2012-12-19 21:32 ` [PATCH 1/3] test: " Michal Sojka
2013-09-03 23:56   ` David Bremner
2012-12-19 21:32 ` Michal Sojka [this message]
2012-12-19 21:32 ` [PATCH 3/3] tags_to_maildir_flags: Don't rename if no flags change Michal Sojka
2013-09-03  1:10   ` [PATCH] test: update insert tests for new maildir synchronization rules david
2013-09-03  5:19     ` [PATCH 1/2] test: add more maildir flag syncing related tests to insert Jani Nikula
2013-09-03  5:19       ` [PATCH 2/2] test: improve insert test reliability by checking message-id instead of count Jani Nikula
2013-09-03  9:26       ` [PATCH 1/2] test: add more maildir flag syncing related tests to insert David Bremner
2013-09-03 12:11         ` Jani Nikula
2013-09-03  5:22     ` [PATCH] test: update insert tests for new maildir synchronization rules Jani Nikula
2013-09-02 17:56 ` [PATCH 0/3] Adding non-maildir tags does not move message from new to cur Jani Nikula

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=1355952747-27350-3-git-send-email-sojkam1@fel.cvut.cz \
    --to=sojkam1@fel.cvut.cz \
    --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).