Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2sharp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Straub <bs@github.com>2013-11-11 20:42:26 +0400
committerBen Straub <bs@github.com>2013-11-11 20:54:39 +0400
commit1679067e35348335130e6c7a206f497e1c378d73 (patch)
tree7ddd35a21f05259c8373620664c37c81ddfc4474 /LibGit2Sharp.Tests/BranchFixture.cs
parent94aeb13043c31246348ecb399639c7779410d807 (diff)
Fix broken tests on OS X
Diffstat (limited to 'LibGit2Sharp.Tests/BranchFixture.cs')
-rw-r--r--LibGit2Sharp.Tests/BranchFixture.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/LibGit2Sharp.Tests/BranchFixture.cs b/LibGit2Sharp.Tests/BranchFixture.cs
index a6fcc300..63fcced7 100644
--- a/LibGit2Sharp.Tests/BranchFixture.cs
+++ b/LibGit2Sharp.Tests/BranchFixture.cs
@@ -30,7 +30,13 @@ namespace LibGit2Sharp.Tests
Assert.Equal("refs/heads/" + name, newBranch.CanonicalName);
Assert.NotNull(newBranch.Tip);
Assert.Equal(committish, newBranch.Tip.Sha);
- Assert.NotNull(repo.Branches.SingleOrDefault(p => p.Name == name));
+
+ // Note the call to String.Normalize(). This is because, on Mac OS X, the filesystem
+ // decomposes the UTF-8 characters on write, which results in a different set of bytes
+ // when they're read back:
+ // - from InlineData: C5-00-6E-00-67-00-73-00-74-00-72-00-F6-00-6D-00
+ // - from filesystem: 41-00-0A-03-6E-00-67-00-73-00-74-00-72-00-6F-00-08-03-6D-00
+ Assert.NotNull(repo.Branches.SingleOrDefault(p => p.Name.Normalize() == name));
AssertRefLogEntry(repo, newBranch.CanonicalName,
newBranch.Tip.Id,