]>
git.proxmox.com Git - libgit2.git/blob - tests/config/config_helpers.c
1 #include "clar_libgit2.h"
2 #include "config_helpers.h"
3 #include "repository.h"
5 void assert_config_entry_existence(
8 bool is_supposed_to_exist
)
14 cl_git_pass(git_repository_config__weakptr(&config
, repo
));
16 result
= git_config_get_string(&out
, config
, name
);
18 if (is_supposed_to_exist
)
21 cl_assert_equal_i(GIT_ENOTFOUND
, result
);
24 void assert_config_entry_value(
27 const char *expected_value
)
32 cl_git_pass(git_repository_config__weakptr(&config
, repo
));
34 cl_git_pass(git_config_get_string(&out
, config
, name
));
36 cl_assert_equal_s(expected_value
, out
);