mirror of
https://git.proxmox.com/git/libgit2
synced 2026-01-03 03:59:08 +00:00
Add test case to test ']' and '\\' characters in config subsection
This commit is contained in:
parent
566dd8cec0
commit
d52a93fab3
@ -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;
|
||||
|
||||
11
tests-clar/resources/config/config20
Normal file
11
tests-clar/resources/config/config20
Normal 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
|
||||
Loading…
Reference in New Issue
Block a user