mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-07 23:19:28 +00:00
Add test for section header at end of file
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
This commit is contained in:
parent
f58c53ce66
commit
156af801e6
BIN
tests/resources/config/config10
Normal file
BIN
tests/resources/config/config10
Normal file
Binary file not shown.
@ -263,6 +263,14 @@ BEGIN_TEST(config13, "can't delete a non-existent value")
|
|||||||
git_config_free(cfg);
|
git_config_free(cfg);
|
||||||
END_TEST
|
END_TEST
|
||||||
|
|
||||||
|
BEGIN_TEST(config14, "don't fail horribly if a section header is in the last line")
|
||||||
|
git_config *cfg;
|
||||||
|
|
||||||
|
/* By freeing the config, we make sure we flush the values */
|
||||||
|
must_pass(git_config_open_ondisk(&cfg, CONFIG_BASE "/config10"));
|
||||||
|
git_config_free(cfg);
|
||||||
|
END_TEST
|
||||||
|
|
||||||
BEGIN_SUITE(config)
|
BEGIN_SUITE(config)
|
||||||
ADD_TEST(config0);
|
ADD_TEST(config0);
|
||||||
ADD_TEST(config1);
|
ADD_TEST(config1);
|
||||||
@ -278,4 +286,5 @@ BEGIN_SUITE(config)
|
|||||||
ADD_TEST(config11);
|
ADD_TEST(config11);
|
||||||
ADD_TEST(config12);
|
ADD_TEST(config12);
|
||||||
ADD_TEST(config13);
|
ADD_TEST(config13);
|
||||||
|
ADD_TEST(config14);
|
||||||
END_SUITE
|
END_SUITE
|
||||||
|
Loading…
Reference in New Issue
Block a user