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:
authorCarlos Martín Nieto <cmn@elego.de>2012-11-14 01:41:01 +0400
committerCarlos Martín Nieto <cmn@elego.de>2012-11-14 01:53:41 +0400
commit47db054df053fb09c8c92edaa0238af2a2605e65 (patch)
treeb7a61fc24c910b0604a3493323d9064111d816b0 /tests-clar/config
parent3ee078c0f7ed278be4839a6bde7dce29a614d336 (diff)
config: distinguish between a lone variable name and one without rhs
'[section] variable' and '[section] variable =' behave differently when parsed as booleans, so we need to store that distinction internally.
Diffstat (limited to 'tests-clar/config')
-rw-r--r--tests-clar/config/read.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests-clar/config/read.c b/tests-clar/config/read.c
index 10ae0a4fb..a468a4d92 100644
--- a/tests-clar/config/read.c
+++ b/tests-clar/config/read.c
@@ -93,6 +93,12 @@ void test_config_read__lone_variable(void)
cl_git_pass(git_config_get_bool(&i, cfg, "some.section.variable"));
cl_assert(i == 1);
+ cl_git_pass(git_config_get_string(&str, cfg, "some.section.variableeq"));
+ cl_assert_equal_s(str, "");
+
+ cl_git_pass(git_config_get_bool(&i, cfg, "some.section.variableeq"));
+ cl_assert(i == 0);
+
git_config_free(cfg);
}