diff options
author | Sven Strickroth <email@cs-ware.de> | 2013-03-07 22:15:40 +0100 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-03-25 14:03:16 -0700 |
commit | b8acb775e25c76f07dac8855ad0a88b37f7b2f17 (patch) | |
tree | f7e8d173813745f2a56c6078897fb9aeb9cad479 /tests-clar/checkout/index.c | |
parent | 9733e80c2ae7517f44c658cd2914d99454470dd1 (diff) | |
download | libgit2-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.c | 17 |
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"); +} |