Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinquize <linquize@yahoo.com.hk>2014-10-04 19:28:40 +0400
committerLinquize <linquize@yahoo.com.hk>2014-10-04 19:28:40 +0400
commita447a7e40b03d1c8ecb49ab0ef015eb4c0fd2b6e (patch)
tree314a0492e3a1f7748c07f1b9dea3c549a68bcbc6 /tests/config
parent0a64164700d3867855a0a7f6d168fb41eb704bf0 (diff)
config: Add test cases that have trailing spaces before comment chars
Diffstat (limited to 'tests/config')
-rw-r--r--tests/config/stress.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/config/stress.c b/tests/config/stress.c
index 488915e79..e8e9d2b61 100644
--- a/tests/config/stress.c
+++ b/tests/config/stress.c
@@ -44,12 +44,24 @@ void test_config_stress__comments(void)
cl_git_pass(git_config_open_ondisk(&config, cl_fixture("config/config12")));
+ cl_git_pass(git_config_get_string(&str, config, "some.section.test2"));
+ cl_assert_equal_s("hello", str);
+
+ cl_git_pass(git_config_get_string(&str, config, "some.section.test3"));
+ cl_assert_equal_s("welcome", str);
+
cl_git_pass(git_config_get_string(&str, config, "some.section.other"));
cl_assert_equal_s("hello! \" ; ; ; ", str);
+ cl_git_pass(git_config_get_string(&str, config, "some.section.other2"));
+ cl_assert_equal_s("cool! \" # # # ", str);
+
cl_git_pass(git_config_get_string(&str, config, "some.section.multi"));
cl_assert_equal_s("hi, this is a ; multiline comment # with ;\n special chars and other stuff !@#", str);
+ cl_git_pass(git_config_get_string(&str, config, "some.section.multi2"));
+ cl_assert_equal_s("good, this is a ; multiline comment # with ;\n special chars and other stuff !@#", str);
+
cl_git_pass(git_config_get_string(&str, config, "some.section.back"));
cl_assert_equal_s("this is \ba phrase", str);