diff options
| author | Linquize <linquize@yahoo.com.hk> | 2013-09-30 23:58:58 +0800 |
|---|---|---|
| committer | Linquize <linquize@yahoo.com.hk> | 2013-10-01 09:56:59 +0800 |
| commit | d52a93fab330dbbe1271c10b527d333261638fe3 (patch) | |
| tree | 65dc8d603cd19b1ab73472280dbf6e08928e7329 /tests-clar | |
| parent | 566dd8cec06e511490c6473d2440c39ff1b2851c (diff) | |
| download | libgit2-d52a93fab330dbbe1271c10b527d333261638fe3.tar.gz | |
Add test case to test ']' and '\\' characters in config subsection
Diffstat (limited to 'tests-clar')
| -rw-r--r-- | tests-clar/config/read.c | 7 | ||||
| -rw-r--r-- | tests-clar/resources/config/config20 | 11 |
2 files changed, 18 insertions, 0 deletions
diff --git a/tests-clar/config/read.c b/tests-clar/config/read.c index 722a15a71..ab068eaa7 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 000000000..8f0f12c4c --- /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 |
