Add test case to test ']' and '\\' characters in config subsection
diff --git a/tests-clar/config/read.c b/tests-clar/config/read.c
index 722a15a..ab068ea 100644
--- a/tests-clar/config/read.c
+++ b/tests-clar/config/read.c
@@ -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;
diff --git a/tests-clar/resources/config/config20 b/tests-clar/resources/config/config20
new file mode 100644
index 0000000..8f0f12c
--- /dev/null
+++ b/tests-clar/resources/config/config20
@@ -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