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>2013-01-31 23:59:24 +0400
committernulltoken <emeric.fermas@gmail.com>2013-02-01 00:03:53 +0400
commit68b291eab4ec6d6d6def54c879329f0081ef6919 (patch)
tree7a8e3e67b814ec03a57295ea7eaa4599db080218 /LibGit2Sharp.Tests
parent078e57f7e47c9b2450e5aabd98b826db3fe1be3f (diff)
Enhance Configuration test coverage
Fix git-tfs/git-tfs#300
Diffstat (limited to 'LibGit2Sharp.Tests')
-rw-r--r--LibGit2Sharp.Tests/ConfigurationFixture.cs13
-rw-r--r--LibGit2Sharp.Tests/Resources/testrepo.git/config1
2 files changed, 14 insertions, 0 deletions
diff --git a/LibGit2Sharp.Tests/ConfigurationFixture.cs b/LibGit2Sharp.Tests/ConfigurationFixture.cs
index 4d56a0a6..bfc0b98a 100644
--- a/LibGit2Sharp.Tests/ConfigurationFixture.cs
+++ b/LibGit2Sharp.Tests/ConfigurationFixture.cs
@@ -1,4 +1,5 @@
using System;
+using System.Collections.Generic;
using System.IO;
using System.Linq;
using LibGit2Sharp.Tests.TestHelpers;
@@ -167,6 +168,18 @@ namespace LibGit2Sharp.Tests
}
[Fact]
+ public void CanEnumerateLocalConfigContainingAKeyWithNoValue()
+ {
+ using (var repo = new Repository(BareTestRepoPath))
+ {
+ var entry = repo.Config
+ .Single<ConfigurationEntry<string>>(c => c.Level == ConfigurationLevel.Local && c.Key == "core.pager");
+
+ Assert.Equal(string.Empty, entry.Value);
+ }
+ }
+
+ [Fact]
public void CanSetBooleanValue()
{
var path = BuildTemporaryCloneOfTestRepo(StandardTestRepoPath);
diff --git a/LibGit2Sharp.Tests/Resources/testrepo.git/config b/LibGit2Sharp.Tests/Resources/testrepo.git/config
index 8e7c7b42..603be26e 100644
--- a/LibGit2Sharp.Tests/Resources/testrepo.git/config
+++ b/LibGit2Sharp.Tests/Resources/testrepo.git/config
@@ -1,3 +1,4 @@
[core]
repositoryformatversion = 0
bare = true
+ pager =