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:
authornulltoken <emeric.fermas@gmail.com>2015-01-07 00:01:35 +0300
committernulltoken <emeric.fermas@gmail.com>2015-01-21 14:20:18 +0300
commitfc2a47cf8f95bddc62d47864b769d95449cfbae4 (patch)
tree4666f2708439c919943c65c65ecd230540fd4292 /LibGit2Sharp.Tests
parent23f97d95d212fd6d21f62b77897e2d95d7b0bace (diff)
Enhance Repository.Lookup() test coverage
Diffstat (limited to 'LibGit2Sharp.Tests')
-rw-r--r--LibGit2Sharp.Tests/RepositoryFixture.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/LibGit2Sharp.Tests/RepositoryFixture.cs b/LibGit2Sharp.Tests/RepositoryFixture.cs
index 789e9046..f59b6cd9 100644
--- a/LibGit2Sharp.Tests/RepositoryFixture.cs
+++ b/LibGit2Sharp.Tests/RepositoryFixture.cs
@@ -494,6 +494,20 @@ namespace LibGit2Sharp.Tests
}
[Fact]
+ public void LookingUpByAWrongRevParseExpressionThrows()
+ {
+ string path = SandboxBareTestRepo();
+ using (var repo = new Repository(path))
+ {
+ Assert.Throws<InvalidSpecificationException>(() => repo.Lookup("tags/point_to_blob^{tree}"));
+ Assert.Throws<InvalidSpecificationException>(() => repo.Lookup("tags/point_to_blob^{commit}"));
+ Assert.Throws<InvalidSpecificationException>(() => repo.Lookup<Commit>("tags/point_to_blob^{commit}"));
+ Assert.Throws<InvalidSpecificationException>(() => repo.Lookup("master^{tree}^{blob}"));
+ Assert.Throws<InvalidSpecificationException>(() => repo.Lookup<Blob>("master^{blob}"));
+ }
+ }
+
+ [Fact]
public void LookingUpAGitLinkThrows()
{
string path = SandboxBareTestRepo();