Skip to content

Commit 2400e02

Browse files
committed
#3341 - additional test for loose parsing of a release
1 parent 4eed0c6 commit 2400e02

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/GitVersion.Core.Tests/IntegrationTests/ReleaseBranchScenarios.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,4 +671,19 @@ public void FeatureOnReleaseFeatureBranchNotDeleted()
671671

672672
fixture.AssertFullSemver("4.5.0-beta.2", configuration);
673673
}
674+
675+
[TestCase("release/1.2.0", "1.2.0-beta.1+1", SemanticVersionFormat.Loose)]
676+
[TestCase("release/1.2.0", "1.2.0-beta.1+1", SemanticVersionFormat.Strict)]
677+
[TestCase("release/1.2", "1.2.0-beta.1+1", SemanticVersionFormat.Loose)]
678+
[TestCase("release/1", "1.0.0-beta.1+1", SemanticVersionFormat.Loose)]
679+
public void ShouldDetectVersionInReleaseBranch(string branchName, string expectedVersion, SemanticVersionFormat semanticVersionFormat)
680+
{
681+
var configuration = GitFlowConfigurationBuilder.New
682+
.WithSemanticVersionFormat(semanticVersionFormat)
683+
.Build();
684+
685+
using var fixture = new EmptyRepositoryFixture(branchName);
686+
fixture.MakeACommit();
687+
fixture.AssertFullSemver(expectedVersion, configuration);
688+
}
674689
}

0 commit comments

Comments
 (0)