Fixing up some win32 issues with autocrlf
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
diff --git a/tests-clar/diff/rename.c b/tests-clar/diff/rename.c
index b5a9935..9864c58 100644
--- a/tests-clar/diff/rename.c
+++ b/tests-clar/diff/rename.c
@@ -7,6 +7,8 @@ static git_repository *g_repo = NULL;
void test_diff_rename__initialize(void)
{
g_repo = cl_git_sandbox_init("renames");
+
+ cl_repo_set_bool(g_repo, "core.autocrlf", false);
}
void test_diff_rename__cleanup(void)
diff --git a/tests-clar/filter/crlf.c b/tests-clar/filter/crlf.c
index ece2e6e..c9fb9cd 100644
--- a/tests-clar/filter/crlf.c
+++ b/tests-clar/filter/crlf.c
@@ -5,16 +5,12 @@ static git_repository *g_repo = NULL;
void test_filter_crlf__initialize(void)
{
- git_config *cfg;
-
g_repo = cl_git_sandbox_init("crlf");
cl_git_mkfile("crlf/.gitattributes",
"*.txt text\n*.bin binary\n*.crlf text eol=crlf\n*.lf text eol=lf\n");
- cl_git_pass(git_repository_config(&cfg, g_repo));
- cl_git_pass(git_config_set_string(cfg, "core.autocrlf", "true"));
- git_config_free(cfg);
+ cl_repo_set_bool(g_repo, "core.autocrlf", true);
}
void test_filter_crlf__cleanup(void)
diff --git a/tests-clar/status/renames.c b/tests-clar/status/renames.c
index d72e563..de84a57 100644
--- a/tests-clar/status/renames.c
+++ b/tests-clar/status/renames.c
@@ -11,6 +11,8 @@ static git_repository *g_repo = NULL;
void test_status_renames__initialize(void)
{
g_repo = cl_git_sandbox_init("renames");
+
+ cl_repo_set_bool(g_repo, "core.autocrlf", false);
}
void test_status_renames__cleanup(void)
@@ -67,7 +69,7 @@ static void test_status(
actual = git_status_byindex(status_list, i);
expected = &expected_list[i];
- cl_assert_equal_i((int)expected->status, (int)actual->status);
+ cl_assert_equal_i_fmt(expected->status, actual->status, "%04x");
oldname = actual->head_to_index ? actual->head_to_index->old_file.path :
actual->index_to_workdir ? actual->index_to_workdir->old_file.path : NULL;