Skip to content

Commit 4dbb5ad

Browse files
committed
Add test for non repo directory
1 parent 5604e18 commit 4dbb5ad

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/NerdBank.GitVersioning.Tests/RepoFinderTests.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,11 @@ public void SubDirectoryWithValidGitFile()
6565
File.WriteAllText(Path.Combine(submodule.FullName, ".git"), $"gitdir: ../{gitDir.Name}");
6666
Assert.Equal(FindGitDir(submodule.FullName), gitDir.FullName);
6767
}
68+
69+
[Fact]
70+
public void NonRepoDirectory()
71+
{
72+
Assert.Equal(FindGitDir(Path.GetTempPath()), null);
73+
}
6874
}
6975
}

0 commit comments

Comments
 (0)