X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=test%2FT590-libconfig.sh;h=6c426ae8f6365a578c9f892675aa13c83fb2f6a7;hb=bab633d3ac87167dc214094f9d340655885a01b1;hp=0b3e54f3e86d144637290fadceaf11bf929d61ef;hpb=378415a55762ff0222e3de6a2e20a9823ce1d07e;p=notmuch diff --git a/test/T590-libconfig.sh b/test/T590-libconfig.sh index 0b3e54f3..6c426ae8 100755 --- a/test/T590-libconfig.sh +++ b/test/T590-libconfig.sh @@ -272,6 +272,29 @@ EOF test_expect_equal_file EXPECTED OUTPUT restore_database +test_begin_subtest "notmuch_config_get_values (ignore leading/trailing whitespace)" +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% { @@ -953,7 +976,6 @@ EOF test_expect_equal_file EXPECTED OUTPUT test_begin_subtest "open: database parameter overrides implicit config" -test_subtest_known_broken notmuch config set database.path ${MAIL_DIR}/nonexistent cat c_head3 - c_tail3 <<'EOF' | test_C ${MAIL_DIR} const char *path = NULL;