aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Michal Sojka <sojka@os.inf.tu-dresden.de>2012-12-19 22:32:25 +0100
committerGravatar David Bremner <bremner@debian.org>2013-09-03 20:33:17 -0300
commit0b46d0fd2e37083bc0d19056aa95e1ad261cd2d6 (patch)
treed835379586c15dde32c7af97589310ed5bca0093 /test
parente1e7b6fd2e116a6adc679a8d909a8f163f556f3d (diff)
test: Adding non-maildir tags does not move message from new to cur
Some MUA's like mutt show the difference between "new" emails living in maildir directory new/, and "old" emails living in maildir directory cur/. However notmuch tag unconditionally moves selected messages from new/ to cur/, even if no maildir synchronized tag is changed. While maildir specification forbids messages with tags living in new/, there is no need to move messages to cur/ when no maildir synchronized tag is changed. Thus notmuch can remain transparent with respect to other MUA's. [ Edited commit log to better describe the intended changes, and tag the test as broken until the actual changes are implemented -- Louis Rilling ] Signed-off-by: Louis Rilling <l.rilling@av7.net> [ Converted to use test_subtest_known_broken, David Bremner ]
Diffstat (limited to 'test')
-rwxr-xr-xtest/maildir-sync9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/maildir-sync b/test/maildir-sync
index 0fc742a4..61657821 100755
--- a/test/maildir-sync
+++ b/test/maildir-sync
@@ -83,6 +83,15 @@ test_expect_equal "$output" "No new mail."
# creating new directories in the mail store, then it should be
# creating all necessary database state for those directories.
+test_begin_subtest "Adding non-maildir tags does not move message from new to cur"
+test_subtest_known_broken
+add_message [subject]='"Message to stay in new"' \
+ [date]='"Sat, 01 Jan 2000 12:00:00 -0000"' \
+ [filename]='message-to-stay-in-new' [dir]=new
+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 "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)