mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
annotated_commit: add failing test for looking up from annotated tag
This commit is contained in:
26
tests/merge/annotated_commit.c
Normal file
26
tests/merge/annotated_commit.c
Normal file
@@ -0,0 +1,26 @@
|
||||
#include "clar_libgit2.h"
|
||||
|
||||
|
||||
static git_repository *g_repo;
|
||||
|
||||
void test_merge_annotated_commit__initialize(void)
|
||||
{
|
||||
g_repo = cl_git_sandbox_init("testrepo");
|
||||
}
|
||||
|
||||
void test_merge_annotated_commit__cleanup(void)
|
||||
{
|
||||
cl_git_sandbox_cleanup();
|
||||
}
|
||||
|
||||
void test_merge_annotated_commit__lookup_annotated_tag(void)
|
||||
{
|
||||
git_annotated_commit *commit;
|
||||
git_reference *ref;
|
||||
|
||||
cl_git_pass(git_reference_lookup(&ref, g_repo, "refs/tags/test"));
|
||||
cl_git_pass(git_annotated_commit_from_ref(&commit, g_repo, ref));
|
||||
|
||||
git_annotated_commit_free(commit);
|
||||
git_reference_free(ref);
|
||||
}
|
||||
Reference in New Issue
Block a user