Skip to content

Commit 854164a

Browse files
committed
Add more tests for contents
Signed-off-by: Sven Strickroth <email@cs-ware.de>
1 parent 433edb5 commit 854164a

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/config/read.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,21 @@ void test_config_read__symbol_headers(void)
209209
{
210210
git_config *cfg;
211211
cl_git_pass(git_config_open_ondisk(&cfg, cl_fixture("config/config20")));
212+
cl_git_pass(git_config_get_string_buf(&buf, cfg, "valid.[subsection].something"));
213+
cl_assert_equal_s("a", buf.ptr);
214+
git_buf_dispose(&buf);
215+
cl_git_pass(git_config_get_string_buf(&buf, cfg, "sec.[subsec]/child.parent"));
216+
cl_assert_equal_s("grand", buf.ptr);
217+
git_buf_dispose(&buf);
218+
cl_git_pass(git_config_get_string_buf(&buf, cfg, "sec2.[subsec2]/child2.type"));
219+
cl_assert_equal_s("dvcs", buf.ptr);
220+
git_buf_dispose(&buf);
221+
cl_git_pass(git_config_get_string_buf(&buf, cfg, "sec3.escape\"quote.vcs"));
222+
cl_assert_equal_s("git", buf.ptr);
223+
git_buf_dispose(&buf);
224+
cl_git_pass(git_config_get_string_buf(&buf, cfg, "sec4.escaping\\slash.lib"));
225+
cl_assert_equal_s("git2", buf.ptr);
226+
git_buf_dispose(&buf);
212227
git_config_free(cfg);
213228
}
214229

0 commit comments

Comments
 (0)