mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-05 15:33:51 +00:00
34 lines
707 B
C
34 lines
707 B
C
#include "clar_libgit2.h"
|
|
#include "fileops.h"
|
|
|
|
static git_repository *g_repo;
|
|
|
|
void test_repo_shallow__initialize(void)
|
|
{
|
|
}
|
|
|
|
void test_repo_shallow__cleanup(void)
|
|
{
|
|
cl_git_sandbox_cleanup();
|
|
}
|
|
|
|
void test_repo_shallow__no_shallow_file(void)
|
|
{
|
|
g_repo = cl_git_sandbox_init("testrepo.git");
|
|
cl_assert_equal_i(0, git_repository_is_shallow(g_repo));
|
|
}
|
|
|
|
void test_repo_shallow__empty_shallow_file(void)
|
|
{
|
|
g_repo = cl_git_sandbox_init("testrepo.git");
|
|
cl_git_mkfile("testrepo.git/shallow", "");
|
|
cl_assert_equal_i(0, git_repository_is_shallow(g_repo));
|
|
}
|
|
|
|
void test_repo_shallow__shallow_repo(void)
|
|
{
|
|
g_repo = cl_git_sandbox_init("shallow.git");
|
|
cl_assert_equal_i(1, git_repository_is_shallow(g_repo));
|
|
}
|
|
|