Commit 854164a5 by Sven Strickroth

Add more tests for contents

Signed-off-by: Sven Strickroth <email@cs-ware.de>
parent 433edb54
......@@ -209,6 +209,21 @@ void test_config_read__symbol_headers(void)
{
git_config *cfg;
cl_git_pass(git_config_open_ondisk(&cfg, cl_fixture("config/config20")));
cl_git_pass(git_config_get_string_buf(&buf, cfg, "valid.[subsection].something"));
cl_assert_equal_s("a", buf.ptr);
git_buf_dispose(&buf);
cl_git_pass(git_config_get_string_buf(&buf, cfg, "sec.[subsec]/child.parent"));
cl_assert_equal_s("grand", buf.ptr);
git_buf_dispose(&buf);
cl_git_pass(git_config_get_string_buf(&buf, cfg, "sec2.[subsec2]/child2.type"));
cl_assert_equal_s("dvcs", buf.ptr);
git_buf_dispose(&buf);
cl_git_pass(git_config_get_string_buf(&buf, cfg, "sec3.escape\"quote.vcs"));
cl_assert_equal_s("git", buf.ptr);
git_buf_dispose(&buf);
cl_git_pass(git_config_get_string_buf(&buf, cfg, "sec4.escaping\\slash.lib"));
cl_assert_equal_s("git2", buf.ptr);
git_buf_dispose(&buf);
git_config_free(cfg);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment