Skip to content

Commit 0f29936

Browse files
committed
annotated_commit: add failing test for looking up from annotated tag
1 parent da8138b commit 0f29936

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

tests/merge/annotated_commit.c

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#include "clar_libgit2.h"
2+
3+
4+
static git_repository *g_repo;
5+
6+
void test_merge_annotated_commit__initialize(void)
7+
{
8+
g_repo = cl_git_sandbox_init("testrepo");
9+
}
10+
11+
void test_merge_annotated_commit__cleanup(void)
12+
{
13+
cl_git_sandbox_cleanup();
14+
}
15+
16+
void test_merge_annotated_commit__lookup_annotated_tag(void)
17+
{
18+
git_annotated_commit *commit;
19+
git_reference *ref;
20+
21+
cl_git_pass(git_reference_lookup(&ref, g_repo, "refs/tags/test"));
22+
cl_git_pass(git_annotated_commit_from_ref(&commit, g_repo, ref));
23+
24+
git_annotated_commit_free(commit);
25+
git_reference_free(ref);
26+
}

0 commit comments

Comments
 (0)