diff options
author | Michal Sojka <sojkam1@fel.cvut.cz> | 2012-12-19 22:32:26 +0100 |
---|---|---|
committer | David Bremner <bremner@debian.org> | 2013-09-03 20:36:12 -0300 |
commit | 4229966dce6588f3d890ac648a059e31747f3bd5 (patch) | |
tree | 079a1a453845d080c84f6356e14e80fa0e8cab91 /test | |
parent | 0b46d0fd2e37083bc0d19056aa95e1ad261cd2d6 (diff) |
test: Add some missing maildir synchronization tests
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.
Diffstat (limited to 'test')
-rwxr-xr-x | test/maildir-sync | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/maildir-sync b/test/maildir-sync index 61657821..b2ac89ff 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) |