Commit bd40f0d7 by Etienne Samson

tests: worktree/bare: check git_worktree_list

parent 7e3c13e0
......@@ -35,13 +35,18 @@ void test_worktree_bare__add(void)
{
git_worktree *wt;
git_repository *wtrepo;
git_strarray wts;
cl_git_pass(git_worktree_add(&wt, g_repo, "name", WORKTREE_REPO, NULL));
cl_git_pass(git_worktree_list(&wts, g_repo));
cl_assert_equal_i(wts.count, 1);
cl_git_pass(git_repository_open(&wtrepo, WORKTREE_REPO));
cl_assert_equal_i(0, git_repository_is_bare(wtrepo));
cl_assert_equal_i(1, git_repository_is_worktree(wtrepo));
git_strarray_free(&wts);
git_worktree_free(wt);
git_repository_free(wtrepo);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment