mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-22 17:34:54 +01:00
test: Add broken test for tag synchronization on files delivered to new/
Currently, notmuch new only synchronizes maildir flags to tags for files that have an "info" part. However, in maildir, new mail doesn't gain the info part until it moves from new/ to cur/. Hence, even though mail in new/ doesn't have an info part, it is still a maildir message and thus has maildir flags (though none of them set). The most visible effect of not synchronizing maildir flags for messages in new/ is that newly delivered messages don't get the unread tag (unless it is assigned by some other mechanism, like new.tags). This patch does *not* modify the test for messages in cur/ that do not have an "info" part. Unlike a message in new/, a message in cur/ without an info part is no longer a maildir message, and thus shouldn't be subject to maildir flag synchronization.
This commit is contained in:
parent
e04b18cf36
commit
b0d0dab22a
1 changed files with 10 additions and 0 deletions
|
@ -166,4 +166,14 @@ add_message [subject]='"Non-compliant maildir info"' [dir]=cur [filename]='non-c
|
||||||
notmuch tag +unread +draft -flagged subject:"Non-compliant maildir info"
|
notmuch tag +unread +draft -flagged subject:"Non-compliant maildir info"
|
||||||
test_expect_equal "$(cd $MAIL_DIR/cur/; ls non-compliant*)" "non-compliant-maildir-info:2,These-are-not-flags-in-ASCII-order-donottouch"
|
test_expect_equal "$(cd $MAIL_DIR/cur/; ls non-compliant*)" "non-compliant-maildir-info:2,These-are-not-flags-in-ASCII-order-donottouch"
|
||||||
|
|
||||||
|
test_begin_subtest "Files in new/ get default synchronized tags"
|
||||||
|
test_subtest_known_broken
|
||||||
|
OLDCONFIG=$(notmuch config get new.tags)
|
||||||
|
notmuch config set new.tags test
|
||||||
|
add_message [subject]='"File in new/"' [dir]=new [filename]='file-in-new'
|
||||||
|
notmuch config set new.tags $OLDCONFIG
|
||||||
|
notmuch search 'subject:"File in new"' | notmuch_search_sanitize > output
|
||||||
|
test_expect_equal "$(< output)" \
|
||||||
|
"thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; File in new/ (test unread)"
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
|
Loading…
Reference in a new issue