]>
git.proxmox.com Git - libgit2.git/blob - tests/libgit2/refs/update.c
1 #include "clar_libgit2.h"
5 static git_repository
*g_repo
;
7 void test_refs_update__initialize(void)
9 g_repo
= cl_git_sandbox_init("testrepo.git");
12 void test_refs_update__cleanup(void)
14 cl_git_sandbox_cleanup();
17 void test_refs_update__updating_the_target_of_a_symref_with_an_invalid_name_returns_EINVALIDSPEC(void)
21 cl_git_pass(git_reference_lookup(&head
, g_repo
, GIT_HEAD_FILE
));
22 cl_assert_equal_i(GIT_REFERENCE_SYMBOLIC
, git_reference_type(head
));
23 git_reference_free(head
);
25 cl_assert_equal_i(GIT_EINVALIDSPEC
, git_reference_symbolic_create(&head
, g_repo
, GIT_HEAD_FILE
, "refs/heads/inv@{id", 1, NULL
));