summaryrefslogtreecommitdiff
path: root/tests-clar/repo/head.c
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2012-10-20 19:23:04 +0200
committernulltoken <emeric.fermas@gmail.com>2012-10-22 19:46:00 +0200
commitf36fb761dce7c0f6c6924d9ce30c9cad72dc1318 (patch)
tree73562e878e49b446dd98fb4bafb383977e3c10c5 /tests-clar/repo/head.c
parentc436ed26e08fde69579d5d0ac31e775cfbd06290 (diff)
downloadlibgit2-f36fb761dce7c0f6c6924d9ce30c9cad72dc1318.tar.gz
tests: more git_repository_head_detached() coverage
Diffstat (limited to 'tests-clar/repo/head.c')
-rw-r--r--tests-clar/repo/head.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests-clar/repo/head.c b/tests-clar/repo/head.c
index 30377dc15..22947168e 100644
--- a/tests-clar/repo/head.c
+++ b/tests-clar/repo/head.c
@@ -177,3 +177,12 @@ void test_repo_head__retrieving_an_orphaned_head_returns_GIT_EORPHANEDHEAD(void)
cl_assert_equal_i(GIT_EORPHANEDHEAD, git_repository_head(&head, repo));
}
+
+void test_repo_head__can_tell_if_an_orphaned_head_is_detached(void)
+{
+ git_reference *head;
+
+ make_head_orphaned(repo, NON_EXISTING_HEAD);
+
+ cl_assert_equal_i(false, git_repository_head_detached(repo));
+}