Skip to content

Commit 47d97b8

Browse files
committed
Use Touch to create test file as per PR comment.
1 parent 299c842 commit 47d97b8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

LibGit2Sharp.Tests/DiffTreeToTreeFixture.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -570,13 +570,12 @@ public void CanShowChangesForAFileWithWin1250EncodingContent()
570570
using (var repo = new Repository(repoPath))
571571
{
572572
// Create the file in the workdir
573-
string testFileFullPath = Path.Combine(repo.Info.WorkingDirectory, testFile);
574573
Encoding win1250Encoding = Encoding.GetEncoding("windows-1250");
575574
Assert.NotNull(win1250Encoding);
576575
const string testFileContent = "Content in windows-1250 encoding."
577576
+ "\u0105\u0119\u0107\u0142\u00F3\u015b\u017a\u017c"
578577
+ "\n";
579-
File.WriteAllText(testFileFullPath, testFileContent, win1250Encoding);
578+
Touch(repo.Info.WorkingDirectory, testFile, testFileContent, win1250Encoding);
580579

581580
//compare changes
582581
var changes = repo.Diff.Compare<Patch>(repo.Head.Tip.Tree,

0 commit comments

Comments
 (0)