Skip to content

Commit

Permalink
Add path filter test with two-deep folder path
Browse files Browse the repository at this point in the history
This repros #587
  • Loading branch information
AArnott committed Apr 12, 2021
1 parent 8126d95 commit 460ed85
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/NerdBank.GitVersioning.Tests/VersionOracleTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -731,6 +731,28 @@ public void GetVersionHeight_IncludeRootExcludeSome()
Assert.Equal(2, this.GetVersionHeight(relativeDirectory));
}

[Fact]
public void GetVersion_PathFilterInTwoDeepSubDirAndVersionBump()
{
this.InitializeSourceControl();

const string relativeDirectory = "src\\lib";
var versionOptions = new VersionOptions
{
Version = new SemanticVersion("1.1"),
PathFilters = new FilterPath[]
{
new FilterPath(".", relativeDirectory),
},
};
this.WriteVersionFile(versionOptions, relativeDirectory);
Assert.Equal(1, this.GetVersionHeight(relativeDirectory));

versionOptions.Version = new SemanticVersion("1.2");
this.WriteVersionFile(versionOptions, relativeDirectory);
Assert.Equal(1, this.GetVersionHeight(relativeDirectory));
}

[Fact]
public void GetVersionHeight_ProjectDirectoryDifferentToVersionJsonDirectory()
{
Expand Down

0 comments on commit 460ed85

Please sign in to comment.