mirror of
https://git.proxmox.com/git/libgit2
synced 2026-01-06 17:13:55 +00:00
add failing test to include a missing config file relative to home dir
This commit is contained in:
parent
6987368565
commit
047fe29c4f
@ -108,6 +108,23 @@ void test_config_include__missing(void)
|
||||
git_config_free(cfg);
|
||||
}
|
||||
|
||||
void test_config_include__missing_homedir(void)
|
||||
{
|
||||
git_config *cfg;
|
||||
git_buf buf = GIT_BUF_INIT;
|
||||
|
||||
cl_git_mkfile("including", "[include]\npath = ~/.nonexistentfile\n[foo]\nbar = baz");
|
||||
|
||||
giterr_clear();
|
||||
cl_git_pass(git_config_open_ondisk(&cfg, "including"));
|
||||
cl_assert(giterr_last() == NULL);
|
||||
cl_git_pass(git_config_get_string_buf(&buf, cfg, "foo.bar"));
|
||||
cl_assert_equal_s("baz", git_buf_cstr(&buf));
|
||||
|
||||
git_buf_free(&buf);
|
||||
git_config_free(cfg);
|
||||
}
|
||||
|
||||
#define replicate10(s) s s s s s s s s s s
|
||||
void test_config_include__depth2(void)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user