Commit 38d0bc1e by Carlos Martín Nieto

Add config test for empty line

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
parent 5892277c
[valid "subsection"]
something = true
[something "else"]
something = false
......@@ -159,6 +159,20 @@ BEGIN_TEST(config5, "test number suffixes")
git_config_free(cfg);
END_TEST
BEGIN_TEST(config6, "test blank lines")
git_config *cfg;
int i;
must_pass(git_config_open_file(&cfg, CONFIG_BASE "/config6"));
must_pass(git_config_get_bool(cfg, "valid.subsection.something", &i));
must_be_true(i == 1);
must_pass(git_config_get_bool(cfg, "something.else.something", &i));
must_be_true(i == 0);
git_config_free(cfg);
END_TEST
BEGIN_SUITE(config)
ADD_TEST(config0);
......@@ -167,4 +181,5 @@ BEGIN_SUITE(config)
ADD_TEST(config3);
ADD_TEST(config4);
ADD_TEST(config5);
ADD_TEST(config6);
END_SUITE
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment