mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-05 15:33:51 +00:00
Test more kinds of bad url
This commit is contained in:
parent
29b77446b7
commit
ff0ef88c5b
@ -46,7 +46,7 @@ void test_clone_nonetwork__cleanup(void)
|
|||||||
cl_fixture_cleanup("./foo");
|
cl_fixture_cleanup("./foo");
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_clone_nonetwork__bad_url(void)
|
void test_clone_nonetwork__bad_urls(void)
|
||||||
{
|
{
|
||||||
/* Clone should clean up the mess if the URL isn't a git repository */
|
/* Clone should clean up the mess if the URL isn't a git repository */
|
||||||
cl_git_fail(git_clone(&g_repo, "not_a_repo", "./foo", &g_options));
|
cl_git_fail(git_clone(&g_repo, "not_a_repo", "./foo", &g_options));
|
||||||
@ -54,6 +54,15 @@ void test_clone_nonetwork__bad_url(void)
|
|||||||
g_options.bare = true;
|
g_options.bare = true;
|
||||||
cl_git_fail(git_clone(&g_repo, "not_a_repo", "./foo", &g_options));
|
cl_git_fail(git_clone(&g_repo, "not_a_repo", "./foo", &g_options));
|
||||||
cl_assert(!git_path_exists("./foo"));
|
cl_assert(!git_path_exists("./foo"));
|
||||||
|
|
||||||
|
cl_git_fail(git_clone(&g_repo, "git://example.com:asdf", "./foo", &g_options));
|
||||||
|
cl_assert(!git_path_exists("./foo"));
|
||||||
|
cl_git_fail(git_clone(&g_repo, "git://example.com:asdf/foo", "./foo", &g_options));
|
||||||
|
cl_assert(!git_path_exists("./foo"));
|
||||||
|
cl_git_fail(git_clone(&g_repo, "https://example.com:asdf", "./foo", &g_options));
|
||||||
|
cl_assert(!git_path_exists("./foo"));
|
||||||
|
cl_git_fail(git_clone(&g_repo, "https://example.com:asdf/foo", "./foo", &g_options));
|
||||||
|
cl_assert(!git_path_exists("./foo"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_clone_nonetwork__do_not_clean_existing_directory(void)
|
void test_clone_nonetwork__do_not_clean_existing_directory(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user