8000 Fix two tests to honor git commit and tag messages formatting · mm201/libgit2sharp@5b219c8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5b219c8

Browse files
committed
Fix two tests to honor git commit and tag messages formatting
Messages are supposed to end with a trailing \n
1 parent 02e5210 commit 5b219c8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

LibGit2Sharp.Tests/RepositoryFixture.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,8 @@ public void LookupObjectByUnknownReferenceNameReturnsNull()
270270
[Fact]
271271
public void CanLookupWhithShortIdentifers()
272272
{
273-
const string expectedAbbrevSha = "edfecad";
274-
const string expectedSha = expectedAbbrevSha + "02d96c9dbf64f6e238c45ddcfa762eef0";
273+
const string expectedAbbrevSha = "fe8410b";
274+
const string expectedSha = expectedAbbrevSha + "6bfdf69ccfd4f397110d61f8070e46e40";
275275

276276
SelfCleaningDirectory scd = BuildSelfCleaningDirectory();
277277

@@ -283,7 +283,7 @@ public void CanLookupWhithShortIdentifers()
283283
repo.Index.< 8000 /span>Stage(filePath);
284284

285285
Signature author = Constants.Signature;
286-
Commit commit = repo.Commit("Initial commit", author, author);
286+
Commit commit = repo.Commit("Initial commit\n", author, author);
287287

288288
commit.Sha.ShouldEqual(expectedSha);
289289

LibGit2Sharp.Tests/TagFixture.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,15 +154,15 @@ public void CanCreateAndOverwriteAnAnnotatedTag()
154154
public void CreatingAnAnnotatedTagIsDeterministic()
155155
{
156156
const string tagName = "nullTAGen";
157-
const string tagMessage = "I've been tagged!";
157+
const string tagMessage = "I've been tagged!\n";
158158

159159
TemporaryCloneOfTestRepo path = BuildTemporaryCloneOfTestRepo();
160160
using (var repo = new Repository(path.RepositoryPath))
161161
{
162162
Tag newTag = repo.Tags.Create(tagName, commitE90810BSha, signatureNtk, tagMessage);
163163
newTag.Target.Sha.ShouldEqual(commitE90810BSha);
164164
newTag.IsAnnotated.ShouldBeTrue();
165-
newTag.Annotation.Sha.ShouldEqual("24f6de34a108d931c6056fc4687637fe36c6bd6b");
165+
newTag.Annotation.Sha.ShouldEqual("26623eee75440d63e10dcb752b88a0004c914161");
166166
newTag.Annotation.Target.Sha.ShouldEqual(commitE90810BSha);
167167
}
168168
}

0 commit comments

Comments
 (0)
0