[PATCH v2 5/5] test: add test for notmuch_message_remove_all_properties_with_prefix

Subject: [PATCH v2 5/5] test: add test for notmuch_message_remove_all_properties_with_prefix

Date: Wed, 29 Mar 2023 18:13:33 +0200

To: notmuch@notmuchmail.org

Cc: Kevin Boulain

From: Kevin Boulain


It wasn't covered, though it shares most of its implementation with
notmuch_message_remove_all_properties.
---
 test/T610-message-property.sh | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/test/T610-message-property.sh b/test/T610-message-property.sh
index e4a4b89c..480b04fc 100755
--- a/test/T610-message-property.sh
+++ b/test/T610-message-property.sh
@@ -346,4 +346,19 @@ 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_done
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: