mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-21 12:24:58 +00:00
Refs: Extend unicode test for branch creation.
This adds another assertion to ensure that the reference name inside the git_reference struct returned by `git_branch_create` is returned as precomposed if `core.precomposeunicode` is enabled.
This commit is contained in:
parent
1a90b1e3f1
commit
9d6c3d2853
@ -179,11 +179,14 @@ void test_refs_branches_create__can_create_branch_with_unicode(void)
|
|||||||
expected[0] = nfd;
|
expected[0] = nfd;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(names); ++i) {
|
for (i = 0; i < ARRAY_SIZE(names); ++i) {
|
||||||
|
const char *name;
|
||||||
cl_git_pass(git_branch_create(
|
cl_git_pass(git_branch_create(
|
||||||
&branch, repo, names[i], target, 0, NULL, NULL));
|
&branch, repo, names[i], target, 0, NULL, NULL));
|
||||||
cl_git_pass(git_oid_cmp(
|
cl_git_pass(git_oid_cmp(
|
||||||
git_reference_target(branch), git_commit_id(target)));
|
git_reference_target(branch), git_commit_id(target)));
|
||||||
|
|
||||||
|
cl_git_pass(git_branch_name(&name, branch));
|
||||||
|
cl_assert_equal_s(expected[i], name);
|
||||||
assert_branch_matches_name(expected[i], names[i]);
|
assert_branch_matches_name(expected[i], names[i]);
|
||||||
if (fs_decompose_unicode && alt[i])
|
if (fs_decompose_unicode && alt[i])
|
||||||
assert_branch_matches_name(expected[i], alt[i]);
|
assert_branch_matches_name(expected[i], alt[i]);
|
||||||
|
Loading…
Reference in New Issue
Block a user