aboutsummaryrefslogtreecommitdiff
path: root/test/T590-libconfig.sh
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2021-02-13 13:17:52 -0400
committerDavid Bremner <david@tethera.net>2021-03-27 09:26:14 -0300
commit0c6db22930b58fcea972e71b45f7ea0e6055ed20 (patch)
tree95a5ef2b6d5844c1edb88b73fb8e1eb1545976a0 /test/T590-libconfig.sh
parent2fc40e24de4fb06428273e6f55ebd72faabde778 (diff)
lib/config: add notmuch_config_get_values_string
This is to support the less common (at least in the notmuch codebase) case of accessing a ;-delimited list config value with an arbitrary string key.
Diffstat (limited to 'test/T590-libconfig.sh')
-rwxr-xr-xtest/T590-libconfig.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/T590-libconfig.sh b/test/T590-libconfig.sh
index dc9964cf..edbba6c4 100755
--- a/test/T590-libconfig.sh
+++ b/test/T590-libconfig.sh
@@ -255,6 +255,29 @@ EOF
test_expect_equal_file EXPECTED OUTPUT
restore_database
+test_begin_subtest "notmuch_config_get_values_string"
+cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} ${NOTMUCH_CONFIG} %NULL%
+{
+ notmuch_config_values_t *values;
+ EXPECT0(notmuch_database_set_config (db, "test.list", "x;y;z"));
+ for (values = notmuch_config_get_values_string (db, "test.list");
+ notmuch_config_values_valid (values);
+ notmuch_config_values_move_to_next (values))
+ {
+ puts (notmuch_config_values_get (values));
+ }
+}
+EOF
+cat <<'EOF' >EXPECTED
+== stdout ==
+x
+y
+z
+== stderr ==
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+restore_database
+
test_begin_subtest "notmuch_config_get_values (restart)"
cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} ${NOTMUCH_CONFIG} %NULL%
{