Commit 976b69bd by nulltoken

repository: widen test coverage regarding initialization and configuration entries

parent 471fa05e
......@@ -166,14 +166,14 @@ void test_repo_init__additional_templates(void)
git_buf_free(&path);
}
static void assert_config_entry_on_init(const char *config_key, int expected_value)
static void assert_config_entry_on_init_bytype(const char *config_key, int expected_value, bool is_bare)
{
git_config *config;
int current_value;
cl_set_cleanup(&cleanup_repository, "config_entry");
cl_git_pass(git_repository_init(&_repo, "config_entry/test.git", 1));
cl_git_pass(git_repository_init(&_repo, "config_entry/test.git", is_bare));
git_repository_config(&config, _repo);
if (expected_value >= 0) {
......@@ -189,6 +189,14 @@ static void assert_config_entry_on_init(const char *config_key, int expected_val
git_config_free(config);
}
static void assert_config_entry_on_init(const char *config_key, int expected_value)
{
assert_config_entry_on_init_bytype(config_key, expected_value, true);
git_repository_free(_repo);
assert_config_entry_on_init_bytype(config_key, expected_value, false);
}
void test_repo_init__detect_filemode(void)
{
#ifdef GIT_WIN32
......
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