Case sensitivity issues on Linux

A couple of tests were actually dealing incorrectly with case
sensitivity issues on Linux because they were relying on having
core.ignorecase set to true.  Now that the fixture initialization
sets the case sensitivity to be accurate for the platform, it
exposed bugs in these tests.
This commit is contained in:
Russell Belfer 2013-10-08 14:41:32 -07:00
parent 14997dc5f6
commit d5e83627e4
2 changed files with 9 additions and 8 deletions

View File

@ -69,14 +69,14 @@ static void test_status(
actual = git_status_byindex(status_list, i);
expected = &expected_list[i];
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;
newname = actual->index_to_workdir ? actual->index_to_workdir->new_file.path :
actual->head_to_index ? actual->head_to_index->new_file.path : NULL;
cl_assert_equal_i_fmt(expected->status, actual->status, "%04x");
if (oldname)
cl_assert(git__strcmp(oldname, expected->oldname) == 0);
else
@ -507,14 +507,14 @@ void test_status_renames__both_casechange_two(void)
"untimely.txt", "untimeliest.txt" }
};
struct status_entry expected_case[] = {
{ GIT_STATUS_INDEX_RENAMED | GIT_STATUS_INDEX_MODIFIED |
GIT_STATUS_WT_RENAMED | GIT_STATUS_WT_MODIFIED,
"ikeepsix.txt", "ikeepsix.txt" },
{ GIT_STATUS_INDEX_MODIFIED | GIT_STATUS_WT_RENAMED,
"sixserving.txt", "SixServing.txt" },
{ GIT_STATUS_INDEX_RENAMED |
GIT_STATUS_WT_MODIFIED | GIT_STATUS_WT_RENAMED,
"songof7cities.txt", "SONGOF7.txt" },
{ GIT_STATUS_INDEX_MODIFIED | GIT_STATUS_WT_RENAMED,
"sixserving.txt", "SixServing.txt" },
{ GIT_STATUS_INDEX_RENAMED | GIT_STATUS_INDEX_MODIFIED |
GIT_STATUS_WT_RENAMED | GIT_STATUS_WT_MODIFIED,
"ikeepsix.txt", "ikeepsix.txt" },
{ GIT_STATUS_INDEX_RENAMED | GIT_STATUS_WT_RENAMED,
"untimely.txt", "untimeliest.txt" }
};

View File

@ -388,7 +388,8 @@ void test_submodule_status__iterator(void)
opts.flags = GIT_STATUS_OPT_INCLUDE_UNTRACKED |
GIT_STATUS_OPT_INCLUDE_UNMODIFIED |
GIT_STATUS_OPT_INCLUDE_IGNORED |
GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS;
GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS |
GIT_STATUS_OPT_SORT_CASE_INSENSITIVELY;
cl_git_pass(git_status_foreach_ext(
g_repo, &opts, confirm_submodule_status, &exp));