mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-24 20:08:10 +01:00
test: add more maildir flag syncing related tests to insert
Specifically test maildir flag syncing with insert.
This commit is contained in:
parent
a9b2135c75
commit
8ffc60e989
1 changed files with 36 additions and 0 deletions
36
test/insert
36
test/insert
|
@ -77,6 +77,42 @@ notmuch insert +custom -unread < "$gen_msg_filename"
|
|||
output=$(notmuch count tag:custom NOT tag:unread)
|
||||
test_expect_equal "$output" "1"
|
||||
|
||||
test_begin_subtest "Insert message with default tags stays in new/"
|
||||
gen_insert_msg
|
||||
notmuch insert < "$gen_msg_filename"
|
||||
output=$(notmuch search --output=files id:$gen_msg_id)
|
||||
dirname=$(dirname "$output")
|
||||
test_expect_equal "$dirname" "$MAIL_DIR/new"
|
||||
|
||||
test_begin_subtest "Insert message with non-maildir synced tags stays in new/"
|
||||
gen_insert_msg
|
||||
notmuch insert +custom -inbox < "$gen_msg_filename"
|
||||
output=$(notmuch search --output=files id:$gen_msg_id)
|
||||
dirname=$(dirname "$output")
|
||||
test_expect_equal "$dirname" "$MAIL_DIR/new"
|
||||
|
||||
test_begin_subtest "Insert message with custom new.tags goes to cur/"
|
||||
OLDCONFIG=$(notmuch config get new.tags)
|
||||
notmuch config set new.tags test
|
||||
gen_insert_msg
|
||||
notmuch insert < "$gen_msg_filename"
|
||||
output=$(notmuch search --output=files id:$gen_msg_id)
|
||||
dirname=$(dirname "$output")
|
||||
notmuch config set new.tags $OLDCONFIG
|
||||
test_expect_equal "$dirname" "$MAIL_DIR/cur"
|
||||
|
||||
# additional check on the previous message
|
||||
test_begin_subtest "Insert message with custom new.tags actually gets the tags"
|
||||
output=$(notmuch search --output=tags id:$gen_msg_id)
|
||||
test_expect_equal "$output" "test"
|
||||
|
||||
test_begin_subtest "Insert message with maildir synced tags goes to cur/"
|
||||
gen_insert_msg
|
||||
notmuch insert +flagged < "$gen_msg_filename"
|
||||
output=$(notmuch search --output=files id:$gen_msg_id)
|
||||
dirname=$(dirname "$output")
|
||||
test_expect_equal "$dirname" "$MAIL_DIR/cur"
|
||||
|
||||
test_begin_subtest "Insert message into folder"
|
||||
gen_insert_msg
|
||||
notmuch insert --folder=Drafts < "$gen_msg_filename"
|
||||
|
|
Loading…
Reference in a new issue