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:
authorKeith Dahlby <dahlbyk@gmail.com>2013-07-26 21:54:43 +0400
committerKeith Dahlby <dahlbyk@gmail.com>2013-08-07 17:34:13 +0400
commit14ab70eae9346ae53707cdbf57782af0e7971cd3 (patch)
treef981db2c8db1670c4dc907a5c16a064afd2f5977 /LibGit2Sharp.Tests/TestHelpers/BaseFixture.cs
parentbcc25cec6d8f0eb564d23d47af435f3ca1691a7b (diff)
Add optional encoding to Touch()
Diffstat (limited to 'LibGit2Sharp.Tests/TestHelpers/BaseFixture.cs')
-rw-r--r--LibGit2Sharp.Tests/TestHelpers/BaseFixture.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/LibGit2Sharp.Tests/TestHelpers/BaseFixture.cs b/LibGit2Sharp.Tests/TestHelpers/BaseFixture.cs
index 6dc0c76a..c3881e01 100644
--- a/LibGit2Sharp.Tests/TestHelpers/BaseFixture.cs
+++ b/LibGit2Sharp.Tests/TestHelpers/BaseFixture.cs
@@ -218,7 +218,7 @@ namespace LibGit2Sharp.Tests.TestHelpers
};
}
- protected static string Touch(string parent, string file, string content = null)
+ protected static string Touch(string parent, string file, string content = null, Encoding encoding = null)
{
string filePath = Path.Combine(parent, file);
string dir = Path.GetDirectoryName(filePath);
@@ -226,7 +226,7 @@ namespace LibGit2Sharp.Tests.TestHelpers
Directory.CreateDirectory(dir);
- File.WriteAllText(filePath, content ?? string.Empty, Encoding.ASCII);
+ File.WriteAllText(filePath, content ?? string.Empty, encoding ?? Encoding.ASCII);
return filePath;
}