Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2015-10-02 04:43:11 +0300
committerCarlos Martín Nieto <cmn@dwim.me>2015-11-12 19:18:42 +0300
commitde870533e02505f3868403dabd7699da01e4ceda (patch)
tree620ac16e1abe76f4fd5d19fb8fb2ed65604f6570 /tests/core
parent1c34b717e0962971afe28139c3a44b3f5733cff2 (diff)
settings: add a setter for a custom user-agent
Diffstat (limited to 'tests/core')
-rw-r--r--tests/core/useragent.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/core/useragent.c b/tests/core/useragent.c
new file mode 100644
index 000000000..6d06693a8
--- /dev/null
+++ b/tests/core/useragent.c
@@ -0,0 +1,11 @@
+#include "clar_libgit2.h"
+#include "global.h"
+
+void test_core_useragent__get(void)
+{
+ const char *custom_name = "super duper git";
+
+ cl_assert_equal_p(NULL, git_libgit2__user_agent());
+ cl_git_pass(git_libgit2_opts(GIT_OPT_SET_USER_AGENT, custom_name));
+ cl_assert_equal_s(custom_name, git_libgit2__user_agent());
+}