summaryrefslogtreecommitdiff
path: root/tests-clar/clone/clone.c
diff options
context:
space:
mode:
authorBen Straub <bstraub@github.com>2012-06-19 09:15:39 -0700
committerBen Straub <bstraub@github.com>2012-06-21 09:53:44 -0700
commitbb1f6087e44272371d25df9cc5610124f6cd5a01 (patch)
treee6610241b8bd73a53622af4eec680e4799d63c05 /tests-clar/clone/clone.c
parent764df57e82c337a70f55e320bf31acb50c6ffacd (diff)
downloadlibgit2-bb1f6087e44272371d25df9cc5610124f6cd5a01.tar.gz
Add progress reporting to clone.
Diffstat (limited to 'tests-clar/clone/clone.c')
-rw-r--r--tests-clar/clone/clone.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/tests-clar/clone/clone.c b/tests-clar/clone/clone.c
index f60ffb5a1..7b7c7b822 100644
--- a/tests-clar/clone/clone.c
+++ b/tests-clar/clone/clone.c
@@ -28,7 +28,7 @@ static void build_local_file_url(git_buf *out, const char *fixture)
cl_git_pass(git_path_prettify_dir(&path_buf, fixture, NULL));
cl_git_pass(git_buf_puts(out, "file://"));
-#ifdef _MSC_VER
+#ifdef GIT_WIN32
/*
* A FILE uri matches the following format: file://[host]/path
* where "host" can be empty and "path" is an absolute path to the resource.
@@ -62,9 +62,9 @@ static void build_local_file_url(git_buf *out, const char *fixture)
void test_clone_clone__bad_url(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"));
+ cl_git_fail(git_clone(&g_repo, "not_a_repo", "./foo", NULL));
cl_assert(!git_path_exists("./foo"));
- cl_git_fail(git_clone_bare(&g_repo, "not_a_repo", "./foo.git"));
+ cl_git_fail(git_clone_bare(&g_repo, "not_a_repo", "./foo.git", NULL));
cl_assert(!git_path_exists("./foo"));
}
@@ -74,11 +74,13 @@ void test_clone_clone__local(void)
git_buf src = GIT_BUF_INIT;
build_local_file_url(&src, cl_fixture("testrepo.git"));
- cl_git_pass(git_clone(&g_repo, git_buf_cstr(&src), "./local"));
+ cl_git_pass(git_clone(&g_repo, git_buf_cstr(&src), "./local", NULL));
git_repository_free(g_repo);
git_futils_rmdir_r("./local", GIT_DIRREMOVAL_FILES_AND_DIRS);
- cl_git_pass(git_clone_bare(&g_repo, git_buf_cstr(&src), "./local.git"));
+ cl_git_pass(git_clone_bare(&g_repo, git_buf_cstr(&src), "./local.git", NULL));
git_futils_rmdir_r("./local.git", GIT_DIRREMOVAL_FILES_AND_DIRS);
+
+ git_buf_free(&src);
}
@@ -86,8 +88,8 @@ void test_clone_clone__network(void)
{
cl_git_pass(git_clone(&g_repo,
"https://github.com/libgit2/libgit2.git",
- "./libgit2.git"));
- git_futils_rmdir_r("./libgit2.git", GIT_DIRREMOVAL_FILES_AND_DIRS);
+ "./libgit2", NULL));
+ git_futils_rmdir_r("./libgit2", GIT_DIRREMOVAL_FILES_AND_DIRS);
}
@@ -96,6 +98,6 @@ void test_clone_clone__already_exists(void)
mkdir("./foo", GIT_DIR_MODE);
cl_git_fail(git_clone(&g_repo,
"https://github.com/libgit2/libgit2.git",
- "./foo"));
+ "./foo", NULL));
git_futils_rmdir_r("./foo", GIT_DIRREMOVAL_FILES_AND_DIRS);
}