summaryrefslogtreecommitdiff
path: root/tests-clar/checkout
diff options
context:
space:
mode:
authorBen Straub <bstraub@github.com>2012-07-16 16:16:11 -0700
committerBen Straub <bstraub@github.com>2012-07-16 16:22:41 -0700
commit1d68fcd04b21a2c5665d0ca6a5543e7166c73457 (patch)
tree865a768e68ff076dcfa6d374af5234185b93dd5c /tests-clar/checkout
parent9587895f572ad4808fb1746dd6510f92ec30c3a6 (diff)
downloadlibgit2-1d68fcd04b21a2c5665d0ca6a5543e7166c73457.tar.gz
Checkout: handle symlinks.
Includes unfinished win32 implementation.
Diffstat (limited to 'tests-clar/checkout')
-rw-r--r--tests-clar/checkout/checkout.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests-clar/checkout/checkout.c b/tests-clar/checkout/checkout.c
index 99de4c90..9ad41d03 100644
--- a/tests-clar/checkout/checkout.c
+++ b/tests-clar/checkout/checkout.c
@@ -66,3 +66,16 @@ void test_checkout_checkout__stats(void)
{
/* TODO */
}
+
+void test_checkout_checkout__links(void)
+{
+ char link_data[1024];
+ size_t link_size = 1024;
+
+ cl_git_pass(git_checkout_force(g_repo, NULL));
+ link_size = p_readlink("./testrepo/link_to_new.txt", link_data, link_size);
+ cl_assert_equal_i(link_size, strlen("new.txt"));
+ link_data[link_size] = '\0';
+ cl_assert_equal_s(link_data, "new.txt");
+ test_file_contents("./testrepo/link_to_new.txt", "my new file\n");
+}