mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-22 17:34:54 +01:00
test: test insert --folder option
Add tests for notmuch insert --folder option.
This commit is contained in:
parent
9a5b129002
commit
0c4b8aa736
1 changed files with 17 additions and 0 deletions
17
test/insert
17
test/insert
|
@ -77,4 +77,21 @@ 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 into folder"
|
||||
gen_insert_msg
|
||||
notmuch insert --folder=Drafts < "$gen_msg_filename"
|
||||
output=$(notmuch search --output=files folder:Drafts)
|
||||
dirname=$(dirname "$output")
|
||||
test_expect_equal "$dirname" "$MAIL_DIR/Drafts/cur"
|
||||
|
||||
test_begin_subtest "Insert message into folder, add/remove tags"
|
||||
gen_insert_msg
|
||||
notmuch insert --folder=Drafts +draft -unread < "$gen_msg_filename"
|
||||
output=$(notmuch count folder:Drafts tag:draft NOT tag:unread)
|
||||
test_expect_equal "$output" "1"
|
||||
|
||||
gen_insert_msg
|
||||
test_expect_code 1 "Insert message into non-existent folder" \
|
||||
"notmuch insert --folder=nonesuch < $gen_msg_filename"
|
||||
|
||||
test_done
|
||||
|
|
Loading…
Reference in a new issue