summaryrefslogtreecommitdiff
path: root/tests/checkout/crlf.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@microsoft.com>2014-06-18 16:54:32 -0500
committerEdward Thomson <ethomson@microsoft.com>2014-06-24 13:46:32 -0400
commitd412165f948b77bf548234fd46fb0743f6afc3ed (patch)
treef6a8b3bf4b0d69ba6b744f9f58186faf1a095590 /tests/checkout/crlf.c
parente1fc03c9baea9864dec90d0aef7aadcc2ff20576 (diff)
downloadlibgit2-d412165f948b77bf548234fd46fb0743f6afc3ed.tar.gz
Update text=auto / core.autocrlf=false behavior
Git for Windows 1.9.4 changed the behavior when the text=auto attribute is specified and core.autocrlf=false. Previous observed behavior would *not* filter files when going into the working directory, the new behavior *does* filter. Update our behavior to match.
Diffstat (limited to 'tests/checkout/crlf.c')
-rw-r--r--tests/checkout/crlf.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/checkout/crlf.c b/tests/checkout/crlf.c
index 2c84a77f3..496f83d5d 100644
--- a/tests/checkout/crlf.c
+++ b/tests/checkout/crlf.c
@@ -279,8 +279,13 @@ void test_checkout_crlf__autocrlf_false_text_auto_attr(void)
git_checkout_head(g_repo, &opts);
- check_file_contents("./crlf/all-lf", ALL_LF_TEXT_RAW);
- check_file_contents("./crlf/all-crlf", ALL_CRLF_TEXT_RAW);
+ if (GIT_EOL_NATIVE == GIT_EOL_CRLF) {
+ check_file_contents("./crlf/all-lf", ALL_LF_TEXT_AS_CRLF);
+ check_file_contents("./crlf/all-crlf", ALL_CRLF_TEXT_AS_CRLF);
+ } else {
+ check_file_contents("./crlf/all-lf", ALL_LF_TEXT_RAW);
+ check_file_contents("./crlf/all-crlf", ALL_CRLF_TEXT_RAW);
+ }
}
void test_checkout_crlf__autocrlf_true_text_auto_attr(void)