Skip to content

Commit e7b28df

Browse files
committed
Add test for building with precise assembly version and no .git folder
Effectively repros #103
1 parent bdfbdce commit e7b28df

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/NerdBank.GitVersioning.Tests/BuildIntegrationTests.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,22 @@ public async Task GetBuildVersion_Without_Git()
9898
Assert.Equal("3.4.0", buildResult.AssemblyInformationalVersion);
9999
}
100100

101+
[Fact]
102+
public async Task GetBuildVersion_Without_Git_HighPrecisionAssemblyVersion()
103+
{
104+
this.WriteVersionFile(new VersionOptions
105+
{
106+
Version = SemanticVersion.Parse("3.4"),
107+
AssemblyVersion = new VersionOptions.AssemblyVersionOptions
108+
{
109+
Precision = VersionOptions.VersionPrecision.Revision,
110+
},
111+
});
112+
var buildResult = await this.BuildAsync();
113+
Assert.Equal("3.4", buildResult.BuildVersion);
114+
Assert.Equal("3.4.0", buildResult.AssemblyInformationalVersion);
115+
}
116+
101117
[Fact]
102118
public async Task GetBuildVersion_OutsideGit_PointingToGit()
103119
{

0 commit comments

Comments
 (0)