aboutsummaryrefslogtreecommitdiff
path: root/test/T590-libconfig.sh
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2021-09-30 14:17:47 -0300
committerDavid Bremner <david@tethera.net>2021-12-04 12:15:49 -0400
commite22bbb124e4f9191880e80d6517346f35bf7e2a9 (patch)
treecff4d213fe46c8fd1b3948075f9823404e1e65b7 /test/T590-libconfig.sh
parenteafb033d3220f1388f434dc29618924659fc2d33 (diff)
test: known broken tests for leading/trailing ws in config
These tests duplicate the bug/misfeature reported in id:CA+Tk8fzjPLaEd3vL1f9ebk_bF_RV8PDTLzDupraTkCLCpJAmCg@mail.gmail.com
Diffstat (limited to 'test/T590-libconfig.sh')
-rwxr-xr-xtest/T590-libconfig.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/T590-libconfig.sh b/test/T590-libconfig.sh
index 9fa51fc0..912aaa1f 100755
--- a/test/T590-libconfig.sh
+++ b/test/T590-libconfig.sh
@@ -272,6 +272,30 @@ EOF
test_expect_equal_file EXPECTED OUTPUT
restore_database
+test_begin_subtest "notmuch_config_get_values (ignore leading/trailing whitespace)"
+test_subtest_known_broken
+cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} ${NOTMUCH_CONFIG} %NULL%
+{
+ notmuch_config_values_t *values;
+ EXPECT0(notmuch_config_set (db, NOTMUCH_CONFIG_NEW_TAGS, " a ; b c ; d "));
+ for (values = notmuch_config_get_values (db, NOTMUCH_CONFIG_NEW_TAGS);
+ notmuch_config_values_valid (values);
+ notmuch_config_values_move_to_next (values))
+ {
+ puts (notmuch_config_values_get (values));
+ }
+}
+EOF
+cat <<'EOF' >EXPECTED
+== stdout ==
+a
+b c
+d
+== stderr ==
+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%
{