Test more kinds of bad url
diff --git a/tests-clar/clone/nonetwork.c b/tests-clar/clone/nonetwork.c
index 071e3d0..9eb4bf9 100644
--- a/tests-clar/clone/nonetwork.c
+++ b/tests-clar/clone/nonetwork.c
@@ -46,7 +46,7 @@ void test_clone_nonetwork__cleanup(void)
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 */
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;
cl_git_fail(git_clone(&g_repo, "not_a_repo", "./foo", &g_options));
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)