diff options
author | nulltoken <emeric.fermas@gmail.com> | 2013-01-31 23:59:24 +0400 |
---|---|---|
committer | nulltoken <emeric.fermas@gmail.com> | 2013-02-01 00:03:53 +0400 |
commit | 68b291eab4ec6d6d6def54c879329f0081ef6919 (patch) | |
tree | 7a8e3e67b814ec03a57295ea7eaa4599db080218 /LibGit2Sharp.Tests | |
parent | 078e57f7e47c9b2450e5aabd98b826db3fe1be3f (diff) |
Enhance Configuration test coverage
Fix git-tfs/git-tfs#300
Diffstat (limited to 'LibGit2Sharp.Tests')
-rw-r--r-- | LibGit2Sharp.Tests/ConfigurationFixture.cs | 13 | ||||
-rw-r--r-- | LibGit2Sharp.Tests/Resources/testrepo.git/config | 1 |
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 = |