Commit 047fe29c by Sim Domingo Committed by Edward Thomson

add failing test to include a missing config file relative to home dir

parent 69873685
......@@ -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)
{
......
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