mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-06 13:25:18 +00:00
Add config test for empty line
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
This commit is contained in:
parent
5892277cd0
commit
38d0bc1e81
BIN
tests/resources/config/config6
Normal file
BIN
tests/resources/config/config6
Normal file
Binary file not shown.
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user