diff options
author | Carlos MartÃn Nieto <cmn@dwim.me> | 2018-12-14 14:29:36 +0100 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2019-01-18 23:01:37 +0000 |
commit | 19cde48cf708c50939f5f303b21de8a9355d9c22 (patch) | |
tree | f8af826a174f95ebd8e52b1fdad847591cb83b36 | |
parent | 42c4c624064727188a226bc0ad4f0db7a4b88ac6 (diff) | |
download | libgit2-19cde48cf708c50939f5f303b21de8a9355d9c22.tar.gz |
annotated_commit: add failing test for looking up from annotated tag
-rw-r--r-- | tests/merge/annotated_commit.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/merge/annotated_commit.c b/tests/merge/annotated_commit.c new file mode 100644 index 000000000..cfdf849e5 --- /dev/null +++ b/tests/merge/annotated_commit.c @@ -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); +} |