mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 18:38:08 +01:00
test: add test for notmuch_message_remove_all_properties_with_prefix
It wasn't covered, though it shares most of its implementation with notmuch_message_remove_all_properties.
This commit is contained in:
parent
fb55ff28a2
commit
a95959c491
1 changed files with 15 additions and 0 deletions
|
@ -356,6 +356,21 @@ for (key,val) in msg.get_properties("testkey",True):
|
||||||
EOF
|
EOF
|
||||||
test_expect_equal_file /dev/null OUTPUT
|
test_expect_equal_file /dev/null OUTPUT
|
||||||
|
|
||||||
|
test_begin_subtest "notmuch_message_remove_all_properties_with_prefix"
|
||||||
|
cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
|
||||||
|
EXPECT0(notmuch_message_remove_all_properties_with_prefix (message, "testkey3"));
|
||||||
|
print_properties (message, "", FALSE);
|
||||||
|
EOF
|
||||||
|
cat <<'EOF' >EXPECTED
|
||||||
|
== stdout ==
|
||||||
|
fancy key with áccènts = import value with =
|
||||||
|
testkey1 = alice
|
||||||
|
testkey1 = bob
|
||||||
|
testkey1 = testvalue2
|
||||||
|
== stderr ==
|
||||||
|
EOF
|
||||||
|
test_expect_equal_file EXPECTED OUTPUT
|
||||||
|
|
||||||
test_begin_subtest "edit property on removed message without uncaught exception"
|
test_begin_subtest "edit property on removed message without uncaught exception"
|
||||||
cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
|
cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
|
||||||
EXPECT0(notmuch_database_remove_message (db, notmuch_message_get_filename (message)));
|
EXPECT0(notmuch_database_remove_message (db, notmuch_message_get_filename (message)));
|
||||||
|
|
Loading…
Reference in a new issue