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>2014-02-25 03:31:00 +0400
committernulltoken <emeric.fermas@gmail.com>2014-05-14 14:37:09 +0400
commit469e6da79c9e83fad9cab001b3e6f4bc0c56fc89 (patch)
treee368a05bbd1a78b8c248237bed67b79fb976fe5a /LibGit2Sharp.Tests
parent556afd194dbdbc636ca36d232b75a638252fe6c9 (diff)
Introduce repo.Revert(commit)
Diffstat (limited to 'LibGit2Sharp.Tests')
-rw-r--r--LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj1
-rw-r--r--LibGit2Sharp.Tests/RevertFixture.cs19
2 files changed, 20 insertions, 0 deletions
diff --git a/LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj b/LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj
index 76d100e6..9c0809b2 100644
--- a/LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj
+++ b/LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj
@@ -65,6 +65,7 @@
<Compile Include="PatchStatsFixture.cs" />
<Compile Include="RefSpecFixture.cs" />
<Compile Include="EqualityFixture.cs" />
+ <Compile Include="RevertFixture.cs" />
<Compile Include="SignatureFixture.cs" />
<Compile Include="FilterBranchFixture.cs" />
<Compile Include="RemoveFixture.cs" />
diff --git a/LibGit2Sharp.Tests/RevertFixture.cs b/LibGit2Sharp.Tests/RevertFixture.cs
new file mode 100644
index 00000000..c2ad3881
--- /dev/null
+++ b/LibGit2Sharp.Tests/RevertFixture.cs
@@ -0,0 +1,19 @@
+using LibGit2Sharp.Tests.TestHelpers;
+using Xunit;
+
+namespace LibGit2Sharp.Tests
+{
+ public class RevertFixture : BaseFixture
+ {
+ [Fact]
+ public void RevertDoesntCrash()
+ {
+ string path = CloneStandardTestRepo();
+ using (var repo = new Repository(path))
+ {
+ repo.Reset(ResetMode.Hard);
+ repo.Revert(repo.Head.Tip);
+ }
+ }
+ }
+}