]> git.proxmox.com Git - libgit2.git/blame - tests-clar/config/config_helpers.c
buf: introduce git_buf_splice()
[libgit2.git] / tests-clar / config / config_helpers.c
CommitLineData
0b98a8a4 1#include "clar_libgit2.h"
2#include "config_helpers.h"
3#include "repository.h"
4
5void assert_config_entry_existence(
6 git_repository *repo,
7 const char *name,
8 bool is_supposed_to_exist)
9{
10 git_config *config;
11 const char *out;
12 int result;
13
14 cl_git_pass(git_repository_config__weakptr(&config, repo));
15
16 result = git_config_get_string(&out, config, name);
17
18 if (is_supposed_to_exist)
19 cl_git_pass(result);
20 else
21 cl_assert_equal_i(GIT_ENOTFOUND, result);
22}