Skip to content

Commit cbd9d5d

Browse files
pianomanjhJosh Huber
authored andcommitted
additional test to check the case where the named config is in a relative subdirectory of repo root, and working is repo root
1 parent 3f959ae commit cbd9d5d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/GitVersionCore.Tests/NamedConfigFileLocatorTests.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,18 @@ public void DoNotThrowWhenWorkingAndRepoPathsAreSame()
6060
Should.NotThrow(() => { configFileLocator.Verify(workingPath, repoPath, fileSystem); });
6161
}
6262

63+
[Test]
64+
public void DoNotThrowWhenConfigFileIsInSubDirectoryOfRepoPath()
65+
{
66+
workingPath = DefaultRepoPath;
67+
68+
options = Options.Create(new Arguments { ConfigFile = "./src/my-config.yaml" });
69+
configFileLocator = new NamedConfigFileLocator(fileSystem, log, options);
70+
SetupConfigFileContent(string.Empty, path: workingPath);
71+
72+
Should.NotThrow(() => { configFileLocator.Verify(workingPath, repoPath); });
73+
}
74+
6375
[Test]
6476
public void NoWarnOnCustomYmlFile()
6577
{

0 commit comments

Comments
 (0)