diff options
author | nulltoken <emeric.fermas@gmail.com> | 2012-11-10 00:49:50 +0400 |
---|---|---|
committer | nulltoken <emeric.fermas@gmail.com> | 2012-11-10 00:49:50 +0400 |
commit | 55f9837f11cae1d9c56e9f81eba3a3b7553ec8dd (patch) | |
tree | 5722b6c654c5e9e44a198a4dd07507e65a0479be /tests-clar/config | |
parent | 0f674411e9358a9d42ba892e853c6abd2303f296 (diff) |
config: make git_config_open_level() work with an empty config
Diffstat (limited to 'tests-clar/config')
-rw-r--r-- | tests-clar/config/configlevel.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests-clar/config/configlevel.c b/tests-clar/config/configlevel.c index d947856fa..69aede6d3 100644 --- a/tests-clar/config/configlevel.c +++ b/tests-clar/config/configlevel.c @@ -57,3 +57,16 @@ void test_config_configlevel__can_read_from_a_single_level_focused_file_after_pa git_config_free(single_level_cfg); } + +void test_config_configlevel__fetching_a_level_from_an_empty_compound_config_returns_ENOTFOUND(void) +{ + git_config *cfg; + git_config *local_cfg; + const char *s; + + cl_git_pass(git_config_new(&cfg)); + + cl_assert_equal_i(GIT_ENOTFOUND, git_config_open_level(&local_cfg, cfg, GIT_CONFIG_LEVEL_LOCAL)); + + git_config_free(cfg); +} |