summaryrefslogtreecommitdiff
path: root/tests-clar/config/config_helpers.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests-clar/config/config_helpers.c')
-rw-r--r--tests-clar/config/config_helpers.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests-clar/config/config_helpers.c b/tests-clar/config/config_helpers.c
index 652f80f94..53bd945a0 100644
--- a/tests-clar/config/config_helpers.c
+++ b/tests-clar/config/config_helpers.c
@@ -20,3 +20,18 @@ void assert_config_entry_existence(
else
cl_assert_equal_i(GIT_ENOTFOUND, result);
}
+
+void assert_config_entry_value(
+ git_repository *repo,
+ const char *name,
+ const char *expected_value)
+{
+ git_config *config;
+ const char *out;
+
+ cl_git_pass(git_repository_config__weakptr(&config, repo));
+
+ cl_git_pass(git_config_get_string(&out, config, name));
+
+ cl_assert_equal_s(expected_value, out);
+}