mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-06 19:37:29 +00:00
Add unit test to test add section without lf at EOF
This commit is contained in:
parent
991dab2dd0
commit
693748694b
@ -229,6 +229,22 @@ void test_config_write__add_value_at_file_with_no_clrf_at_the_end(void)
|
||||
git_config_free(cfg);
|
||||
}
|
||||
|
||||
void test_config_write__add_section_at_file_with_no_clrf_at_the_end(void)
|
||||
{
|
||||
git_config *cfg;
|
||||
int i;
|
||||
|
||||
cl_git_pass(git_config_open_ondisk(&cfg, "config17"));
|
||||
cl_git_pass(git_config_set_int32(cfg, "diff.context", 10));
|
||||
git_config_free(cfg);
|
||||
|
||||
cl_git_pass(git_config_open_ondisk(&cfg, "config17"));
|
||||
cl_git_pass(git_config_get_int32(&i, cfg, "diff.context"));
|
||||
cl_assert_equal_i(10, i);
|
||||
|
||||
git_config_free(cfg);
|
||||
}
|
||||
|
||||
void test_config_write__add_value_which_needs_quotes(void)
|
||||
{
|
||||
git_config *cfg;
|
||||
|
Loading…
Reference in New Issue
Block a user