Add test case to test ']' and '\\' characters in config subsection

This commit is contained in:
Linquize 2013-09-30 23:58:58 +08:00
parent 566dd8cec0
commit d52a93fab3
2 changed files with 18 additions and 0 deletions

View File

@ -164,6 +164,13 @@ void test_config_read__empty_files(void)
git_config_free(cfg);
}
void test_config_read__symbol_headers(void)
{
git_config *cfg;
cl_git_pass(git_config_open_ondisk(&cfg, cl_fixture("config/config20")));
git_config_free(cfg);
}
void test_config_read__header_in_last_line(void)
{
git_config *cfg;

View File

@ -0,0 +1,11 @@
[valid "[subsection]"]
something = a
; we don't allow anything after closing "
[sec "[subsec]/child"]
parent = grand
[sec2 "[subsec2]/child2"]
type = dvcs
[sec3 "escape\"quote"]
vcs = git
[sec4 "escaping\\slash"]
lib = git2