diff options
author | Russell Belfer <rb@github.com> | 2014-05-08 14:48:27 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2014-05-08 14:48:27 -0700 |
commit | 8a2ef218b99c41923dc32e25dc0915f68e2e4bca (patch) | |
tree | e1f5779b76b1471e2be9fe12761efac7d1055552 | |
parent | be20ac5a1d170aa1143bb2d1367bc224a88f54d1 (diff) | |
download | libgit2-8a2ef218b99c41923dc32e25dc0915f68e2e4bca.tar.gz |
Don't always test composed-insensitive lookupsrb/unicode-branch-names
Only on a filesystem that is composed/decomposed insensitive,
should be testing that a branch can be looked up by the opposite
form and still work correctly.
-rw-r--r-- | tests/refs/branches/create.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/refs/branches/create.c b/tests/refs/branches/create.c index 518d4e93e..864640ab3 100644 --- a/tests/refs/branches/create.c +++ b/tests/refs/branches/create.c @@ -167,16 +167,16 @@ void test_refs_branches_create__can_create_branch_with_unicode(void) const char *alt[] = { nfd, nfc, NULL }; const char *expected[] = { nfc, nfd, emoji }; unsigned int i; + bool fs_decompose_unicode = + git_path_does_fs_decompose_unicode(git_repository_path(repo)); retrieve_known_commit(&target, repo); if (cl_repo_get_bool(repo, "core.precomposeunicode")) expected[1] = nfc; -#ifdef __APPLE__ /* test decomp. because not all Mac filesystems decompose unicode */ - else if (git_path_does_fs_decompose_unicode(git_repository_path(repo))) + else if (fs_decompose_unicode) expected[0] = nfd; -#endif for (i = 0; i < ARRAY_SIZE(names); ++i) { cl_git_pass(git_branch_create( @@ -185,7 +185,7 @@ void test_refs_branches_create__can_create_branch_with_unicode(void) git_reference_target(branch), git_commit_id(target))); assert_branch_matches_name(expected[i], names[i]); - if (alt[i]) + if (fs_decompose_unicode && alt[i]) assert_branch_matches_name(expected[i], alt[i]); cl_git_pass(git_branch_delete(branch)); |