summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Schreiber <schreiber.arthur@googlemail.com>2014-05-30 15:15:54 +0200
committerArthur Schreiber <schreiber.arthur@googlemail.com>2014-05-30 15:15:54 +0200
commit9d6c3d2853901f2fba049ba80cadb71caa8535c1 (patch)
treed4cf828429124f3a9ca6970033cd1d4d6a474fd3
parent1a90b1e3f106139f75183ef21dd5b461d9d83f1d (diff)
downloadlibgit2-9d6c3d2853901f2fba049ba80cadb71caa8535c1.tar.gz
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.
-rw-r--r--tests/refs/branches/create.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/refs/branches/create.c b/tests/refs/branches/create.c
index 864640ab3..3a4f33b6e 100644
--- a/tests/refs/branches/create.c
+++ b/tests/refs/branches/create.c
@@ -179,11 +179,14 @@ void test_refs_branches_create__can_create_branch_with_unicode(void)
expected[0] = nfd;
for (i = 0; i < ARRAY_SIZE(names); ++i) {
+ const char *name;
cl_git_pass(git_branch_create(
&branch, repo, names[i], target, 0, NULL, NULL));
cl_git_pass(git_oid_cmp(
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]);
if (fs_decompose_unicode && alt[i])
assert_branch_matches_name(expected[i], alt[i]);