diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2023-05-16 12:41:41 +0100 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2023-05-16 12:41:41 +0100 |
commit | f041a94e2c358e84adb5a0fe108288fcb3802970 (patch) | |
tree | b01428dbfdd3e41123aa8cbee3da857affd839e5 /tests/libgit2 | |
parent | 9d41a3fd694d983ade53fb602a58f6df25ce0656 (diff) | |
parent | 12b54ae00948a7a8422af53a8e98a5aa4d51f1f7 (diff) | |
download | libgit2-main.tar.gz |
Diffstat (limited to 'tests/libgit2')
-rw-r--r-- | tests/libgit2/worktree/worktree.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/libgit2/worktree/worktree.c b/tests/libgit2/worktree/worktree.c index 9fd27f49c..fed5c9259 100644 --- a/tests/libgit2/worktree/worktree.c +++ b/tests/libgit2/worktree/worktree.c @@ -645,3 +645,16 @@ void test_worktree_worktree__validate_invalid_worktreedir(void) git_worktree_free(wt); } + +void test_worktree_worktree__is_prunable_missing_repo(void) +{ + git_worktree *wt; + + cl_git_pass(git_worktree_lookup(&wt, fixture.repo, "testrepo-worktree")); + p_rename("testrepo", "testrepo-tmp"); + /* Should not be prunable since the repository moved */ + cl_assert(!git_worktree_is_prunable(wt, NULL)); + p_rename("testrepo-tmp", "testrepo"); + + git_worktree_free(wt); +} |