summaryrefslogtreecommitdiff
path: root/tests-clar/diff/drivers.c
diff options
context:
space:
mode:
authorVicent Martí <vicent@github.com>2013-10-08 17:03:12 -0700
committerVicent Martí <vicent@github.com>2013-10-08 17:03:12 -0700
commit95c148b2c772b5f97e0db60bff089d8fa944971c (patch)
tree18695995886b76a7c7e4e3fc0447bdfe7300bc63 /tests-clar/diff/drivers.c
parent062c95c2a9265cab8039c02a978944cd672017e5 (diff)
parent867f7c9b3329952dc0aebf9770019a7a01ff2691 (diff)
downloadlibgit2-95c148b2c772b5f97e0db60bff089d8fa944971c.tar.gz
Merge pull request #1886 from libgit2/precompose-utf8
Add support for core.precomposeunicode on Mac
Diffstat (limited to 'tests-clar/diff/drivers.c')
-rw-r--r--tests-clar/diff/drivers.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests-clar/diff/drivers.c b/tests-clar/diff/drivers.c
index e02dd5c68..719d229fc 100644
--- a/tests-clar/diff/drivers.c
+++ b/tests-clar/diff/drivers.c
@@ -147,6 +147,13 @@ void test_diff_drivers__long_lines(void)
cl_git_pass(git_diff_get_patch(&patch, NULL, diff, 0));
cl_git_pass(git_diff_patch_to_str(&actual, patch));
+ /* if chmod not supported, overwrite mode bits since anything is possible */
+ if (!cl_is_chmod_supported()) {
+ size_t actual_len = strlen(actual);
+ if (actual_len > 72 && memcmp(&actual[66], "100644", 6) != 0)
+ memcpy(&actual[66], "100644", 6);
+ }
+
cl_assert_equal_s(expected, actual);
free(actual);