aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2010-11-11 02:43:21 -0800
committerGravatar Carl Worth <cworth@cworth.org>2010-11-11 03:40:19 -0800
commit0100df8edbc84d95210c369b9eb560b87c2d36be (patch)
tree4023f31913e87f08e89056e08fcbd0c856b0cfec /test
parent81cbaafc0f64dcc77933d06e0d2b22ee38eefd88 (diff)
test: Add a new test that removal of a maildir flag also changes tags
This test exposes an existing bug, so is currently failing.
Diffstat (limited to 'test')
-rwxr-xr-xtest/maildir-sync15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/maildir-sync b/test/maildir-sync
index 4a410733..5984f542 100755
--- a/test/maildir-sync
+++ b/test/maildir-sync
@@ -96,6 +96,21 @@ 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 "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)
+output+="
+"
+mv "${gen_msg_filename}" "${gen_msg_filename%S}"
+increment_mtime "$(dirname "${gen_msg_filename}")"
+output+=$(NOTMUCH_NEW)
+output+="
+"
+output+=$(notmuch search subject:"Removing S flag" | notmuch_search_sanitize)
+test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Removing S flag (inbox)
+No new mail. Detected 1 file rename.
+thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Removing S flag (inbox unread)"
+
test_begin_subtest "Removing info from filename leaves tags unchanged"
add_message [subject]='"Message to lose maildir info"' [filename]='message-to-lose-maildir-info' [dir]=cur
notmuch tag -unread subject:"Message to lose maildir info"