Skip to content

Commit 5eab4da

Browse files
committed
Add test config parsing
This tests parsing a multiline string containing multiple quoted comment chars. See libgit2#6019
1 parent f1b89a2 commit 5eab4da

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

tests/config/read.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,13 @@ void test_config_read__symbol_headers(void)
213213
git_config_free(cfg);
214214
}
215215

216+
void test_config_read__multiline_multiple_quoted_comment_chars(void)
217+
{
218+
git_config *cfg;
219+
cl_git_pass(git_config_open_ondisk(&cfg, cl_fixture("config/config21")));
220+
git_config_free(cfg);
221+
}
222+
216223
void test_config_read__header_in_last_line(void)
217224
{
218225
git_config *cfg;

tests/resources/config/config21

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[alias]
2+
m = '\
3+
";" \
4+
";" \
5+
'

0 commit comments

Comments
 (0)