aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKevin Boulain <kevin@boula.in>2023-03-29 18:13:33 +0200
committerDavid Bremner <david@tethera.net>2023-03-30 08:07:57 -0300
commita95959c491cc9ed7ca1493272b3fa91313f75041 (patch)
treeaa3c71632abe810f6afb68f62095283aaf38900d /test
parentfb55ff28a2fdaa9c218af5ca10b1cae674869edd (diff)
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.
Diffstat (limited to 'test')
-rwxr-xr-xtest/T610-message-property.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/T610-message-property.sh b/test/T610-message-property.sh
index 05cfd3b5..a7cbe048 100755
--- a/test/T610-message-property.sh
+++ b/test/T610-message-property.sh
@@ -356,6 +356,21 @@ for (key,val) in msg.get_properties("testkey",True):
EOF
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"
cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
EXPECT0(notmuch_database_remove_message (db, notmuch_message_get_filename (message)));