Commit bd40f0d7bbb5a50e08e27275b21ffa082d4f0e82

Etienne Samson 2018-06-29T14:39:10

tests: worktree/bare: check git_worktree_list

diff --git a/tests/worktree/bare.c b/tests/worktree/bare.c
index 4af5d66..7fda3b5 100644
--- a/tests/worktree/bare.c
+++ b/tests/worktree/bare.c
@@ -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);
 }