summaryrefslogtreecommitdiff
path: root/tests-clar/checkout/index.c
diff options
context:
space:
mode:
authorSven Strickroth <email@cs-ware.de>2013-03-07 22:15:40 +0100
committerRussell Belfer <rb@github.com>2013-03-25 14:03:16 -0700
commitb8acb775e25c76f07dac8855ad0a88b37f7b2f17 (patch)
treef7e8d173813745f2a56c6078897fb9aeb9cad479 /tests-clar/checkout/index.c
parent9733e80c2ae7517f44c658cd2914d99454470dd1 (diff)
downloadlibgit2-b8acb775e25c76f07dac8855ad0a88b37f7b2f17.tar.gz
Added some tests for issue #1397
Signed-off-by: Sven Strickroth <email@cs-ware.de>
Diffstat (limited to 'tests-clar/checkout/index.c')
-rw-r--r--tests-clar/checkout/index.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests-clar/checkout/index.c b/tests-clar/checkout/index.c
index 3976dd20e..6dfa95dd3 100644
--- a/tests-clar/checkout/index.c
+++ b/tests-clar/checkout/index.c
@@ -488,3 +488,20 @@ void test_checkout_index__can_checkout_a_newly_initialized_repository(void)
cl_git_pass(git_checkout_index(g_repo, NULL, NULL));
}
+
+void test_checkout_index__issue_1397(void)
+{
+ git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+
+ test_checkout_index__cleanup();
+
+ g_repo = cl_git_sandbox_init("issue_1397");
+
+ set_core_autocrlf_to(true);
+
+ opts.checkout_strategy = GIT_CHECKOUT_FORCE;
+
+ cl_git_pass(git_checkout_index(g_repo, NULL, &opts));
+
+ test_file_contents("./issue_1397/crlf_file.txt", "first line\r\nsecond line\r\nboth with crlf");
+}