diff options
author | Michal Sojka <sojkam1@fel.cvut.cz> | 2010-11-10 11:27:50 +0100 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2010-11-11 02:35:03 -0800 |
commit | 2638fb75653a6cb65b92429c82e27462aeb34fc6 (patch) | |
tree | 822bce293a14e1f105647b82a3d0ac32319ca85c | |
parent | 2c262042ac174d7bc96d6035ab9c88bd0abe7f35 (diff) |
test: More maildir synchronization tests
Add maildir synchronization tests for multiple messages with the same
message-id. As this is not yet implemented in notmuch, some of these
teste are marked as BROKEN.
I use $(< ) operator to avoid fiddling with stripped trailing newlines
from test results which happens when output+=$(command) is used.
-rwxr-xr-x | test/maildir-sync | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/maildir-sync b/test/maildir-sync index 063c4a7..8d38c43 100755 --- a/test/maildir-sync +++ b/test/maildir-sync @@ -131,4 +131,23 @@ notmuch restore dump.txt output=$(ls $MAIL_DIR/cur) test_expect_equal "$output" "$expected" +test_begin_subtest 'Duplicated message is tagged according to the duplicate' +cp "$MAIL_DIR/cur/msg-003" "$MAIL_DIR/cur/msg-003-dup:2,RS" +increment_mtime $MAIL_DIR/cur +NOTMUCH_NEW > output +notmuch search id:msg-003@notmuch-test-suite | notmuch_search_sanitize >> output +test_expect_equal "$(< output)" "No new mail. +thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; test message 3 (inbox replied tmp)" + +test_begin_subtest 'The original message receives the same flags as the duplicate' +ls $MAIL_DIR/cur > actual +test_expect_equal_failure "$(< actual)" "msg-003:2,RS +msg-003-dup:2,RS" + +test_begin_subtest 'Tagging modifies flags of both the original and the duplicate' +notmuch tag -replied id:msg-003@notmuch-test-suite +ls $MAIL_DIR/cur > actual +test_expect_equal_failure "$(< actual)" "msg-003:2,S +msg-003-dup:2,S" + test_done |