diff options
Diffstat (limited to 'tests-clar/checkout')
| -rw-r--r-- | tests-clar/checkout/checkout.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/tests-clar/checkout/checkout.c b/tests-clar/checkout/checkout.c index 8c2b46e5..71f8f020 100644 --- a/tests-clar/checkout/checkout.c +++ b/tests-clar/checkout/checkout.c @@ -3,10 +3,6 @@ #include "git2/checkout.h" #include "repository.h" -#define DO_LOCAL_TEST 0 -#define DO_LIVE_NETWORK_TESTS 1 -#define LIVE_REPO_URL "http://github.com/libgit2/node-gitteh" - static git_repository *g_repo; @@ -42,12 +38,12 @@ void test_checkout_checkout__bare(void) { cl_git_sandbox_cleanup(); g_repo = cl_git_sandbox_init("testrepo.git"); - cl_git_fail(git_checkout_force(g_repo, NULL)); + cl_git_fail(git_checkout_index(g_repo, NULL)); } void test_checkout_checkout__default(void) { - cl_git_pass(git_checkout_force(g_repo, NULL)); + cl_git_pass(git_checkout_index(g_repo, NULL)); test_file_contents("./testrepo/README", "hey there\n"); test_file_contents("./testrepo/branch_file.txt", "hi\nbye!\n"); test_file_contents("./testrepo/new.txt", "my new file\n"); @@ -61,7 +57,7 @@ void test_checkout_checkout__crlf(void) "README text eol=cr\n" "new.txt text eol=lf\n"; cl_git_mkfile("./testrepo/.gitattributes", attributes); - cl_git_pass(git_checkout_force(g_repo, NULL)); + cl_git_pass(git_checkout_index(g_repo, NULL)); /* test_file_contents("./testrepo/README", "hey there\n"); */ /* test_file_contents("./testrepo/new.txt", "my new file\n"); */ /* test_file_contents("./testrepo/branch_file.txt", "hi\r\nbye!\r\n"); */ @@ -84,7 +80,7 @@ void test_checkout_checkout__symlinks(void) { /* First try with symlinks forced on */ enable_symlinks(true); - cl_git_pass(git_checkout_force(g_repo, NULL)); + cl_git_pass(git_checkout_index(g_repo, NULL)); #ifdef GIT_WIN32 test_file_contents("./testrepo/link_to_new.txt", "new.txt"); @@ -105,7 +101,7 @@ void test_checkout_checkout__symlinks(void) cl_git_sandbox_cleanup(); g_repo = cl_git_sandbox_init("testrepo"); enable_symlinks(false); - cl_git_pass(git_checkout_force(g_repo, NULL)); + cl_git_pass(git_checkout_index(g_repo, NULL)); test_file_contents("./testrepo/link_to_new.txt", "new.txt"); } |
