X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=test%2Fmaildir-sync;h=50a5b8e617b17a59a66ca4a1356e550c1736d7b1;hp=5984f54296bd66aa9207ecf86e246ec76475111a;hb=31b7c04ae1f239c463bc6dcb838acbe4d94c3e2e;hpb=0100df8edbc84d95210c369b9eb560b87c2d36be diff --git a/test/maildir-sync b/test/maildir-sync index 5984f542..50a5b8e6 100755 --- a/test/maildir-sync +++ b/test/maildir-sync @@ -12,11 +12,6 @@ filter_show_json() { echo } -cat >> "$NOTMUCH_CONFIG" </dev/null @@ -155,11 +150,6 @@ notmuch search subject:"Duplicated message" | notmuch_search_sanitize >> output test_expect_equal "$(< output)" "No new mail. thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Duplicated message (inbox replied)" -test_begin_subtest "Duplicate mail with new flags propagates flag to original file" -(cd $MAIL_DIR/cur/; ls duplicated*) > actual -test_expect_equal "$(< actual)" "duplicated-message:2,RS -duplicated-message-copy:2,RS" - test_begin_subtest "Adding duplicate message without flags does not remove tags" cp "$MAIL_DIR/cur/duplicated-message-copy:2,RS" "$MAIL_DIR/cur/duplicated-message-another-copy:2," increment_mtime $MAIL_DIR/cur @@ -175,4 +165,14 @@ test_expect_equal "$(< actual)" "duplicated-message-another-copy:2,S duplicated-message-copy:2,S duplicated-message:2,S" +test_begin_subtest "Synchronizing tag changes preserves unsupported maildir flags" +add_message [subject]='"Unsupported maildir flags"' [dir]=cur [filename]='unsupported-maildir-flags:2,FSZxyz' +notmuch tag +unread +draft -flagged subject:"Unsupported maildir flags" +test_expect_equal "$(cd $MAIL_DIR/cur/; ls unsupported*)" "unsupported-maildir-flags:2,DZxyz" + +test_begin_subtest "A file with non-compliant maildir info will not be renamed" +add_message [subject]='"Non-compliant maildir info"' [dir]=cur [filename]='non-compliant-maildir-info:2,These-are-not-flags-in-ASCII-order-donottouch' +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_done