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

2023-03-30 Thread David Bremner
Kevin Boulain  writes:

> It wasn't covered, though it shares most of its implementation with
> notmuch_message_remove_all_properties.

I have applied this series to master, with one commit added in the
middle

commit 336334996750240608d5f29ed5dd8e40a69c4d79
Author: David Bremner 
Date:   Thu Mar 30 07:56:17 2023 -0300

test: reveal notmuch_message_remove_all_properties as broken

Close and re-open the database to show that the removal is not
committed to the database.

I also had to manually deal with a merge conflict for the last patch, so
you might want to double check that.

In my next life, I will make more liberal use of backup_database /
restore_database, to make the tests in this file less order dependent.

d
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


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

2023-03-29 Thread 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-le...@notmuchmail.org