Skip to content

Commit d040da7

Browse files
committed
Add test that repros build failure reported in #102
1 parent 5c419d7 commit d040da7

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/NerdBank.GitVersioning.Tests/BuildIntegrationTests.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,21 @@ public async Task GetBuildVersion_CustomBuildNumberOffset()
348348
this.AssertStandardProperties(versionOptions, buildResult);
349349
}
350350

351+
[Fact]
352+
public async Task GetBuildVersion_Minus1BuildOffset_NotYetCommitted()
353+
{
354+
this.WriteVersionFile("14.0");
355+
this.InitializeSourceControl();
356+
var versionOptions = new VersionOptions
357+
{
358+
Version = new SemanticVersion(new Version(14, 1)),
359+
BuildNumberOffset = -1,
360+
};
361+
VersionFile.SetVersion(this.RepoPath, versionOptions);
362+
var buildResult = await this.BuildAsync();
363+
this.AssertStandardProperties(versionOptions, buildResult);
364+
}
365+
351366
[Fact]
352367
public async Task PublicRelease_RegEx_Unsatisfied()
353368
{

0 commit comments

Comments
 (0)