]>
git.proxmox.com Git - libgit2.git/blob - tests/libgit2/core/useragent.c
1 #include "clar_libgit2.h"
4 void test_core_useragent__get(void)
6 const char *custom_name
= "super duper git";
7 git_str buf
= GIT_STR_INIT
;
9 cl_assert_equal_p(NULL
, git_libgit2__user_agent());
10 cl_git_pass(git_libgit2_opts(GIT_OPT_SET_USER_AGENT
, custom_name
));
11 cl_assert_equal_s(custom_name
, git_libgit2__user_agent());
13 cl_git_pass(git_libgit2_opts(GIT_OPT_GET_USER_AGENT
, &buf
));
14 cl_assert_equal_s(custom_name
, buf
.ptr
);
16 git_str_dispose(&buf
);