Commit 5eab4dafbe441ef22f06bb1eae6f544a862b822b

Basile Henry 2021-09-09T21:51:52

Add test config parsing This tests parsing a multiline string containing multiple quoted comment chars. See #6019

diff --git a/tests/config/read.c b/tests/config/read.c
index badf511..8d1bb8b 100644
--- a/tests/config/read.c
+++ b/tests/config/read.c
@@ -213,6 +213,13 @@ void test_config_read__symbol_headers(void)
 	git_config_free(cfg);
 }
 
+void test_config_read__multiline_multiple_quoted_comment_chars(void)
+{
+	git_config *cfg;
+	cl_git_pass(git_config_open_ondisk(&cfg, cl_fixture("config/config21")));
+	git_config_free(cfg);
+}
+
 void test_config_read__header_in_last_line(void)
 {
 	git_config *cfg;
diff --git a/tests/resources/config/config21 b/tests/resources/config/config21
new file mode 100644
index 0000000..aa5eb41
--- /dev/null
+++ b/tests/resources/config/config21
@@ -0,0 +1,5 @@
+[alias]
+	m = '\
+	";" \
+	";" \
+	'