Skip to content

Commit 33ed6cb

Browse files
dpurgeasbjornu
authored andcommitted
Failing test case for bug #1255
1 parent 956dc50 commit 33ed6cb

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

src/GitVersionCore.Tests/IntegrationTests/MasterScenarios.cs

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,4 +231,36 @@ public void AreTagsNotAdheringToTagPrefixIgnored()
231231
fixture.AssertFullSemver(config, "0.1.0+6"); //Fallback version + 6 commits since tag
232232
}
233233
}
234+
235+
[Test]
236+
public void Bug1255()
237+
{
238+
var config = new Config
239+
{
240+
NextVersion = "5.0",
241+
Branches =
242+
{
243+
{
244+
"master", new BranchConfig
245+
{
246+
Regex = "master",
247+
Tag = "beta",
248+
Increment = IncrementStrategy.Patch,
249+
VersioningMode = VersioningMode.ContinuousDeployment
250+
}
251+
}
252+
}
253+
};
254+
using (var fixture = new EmptyRepositoryFixture())
255+
{
256+
fixture.Repository.MakeACommit();
257+
fixture.AssertFullSemver(config, "5.0.0-beta.0"); // why not "5.0.0-beta.1"?
258+
fixture.Repository.MakeACommit();
259+
fixture.AssertFullSemver(config, "5.0.0-beta.1");
260+
fixture.Repository.MakeATaggedCommit("v5.0.0-rc.1");
261+
fixture.AssertFullSemver(config, "5.0.0-rc.1");
262+
fixture.Repository.MakeACommit();
263+
fixture.AssertFullSemver(config, "5.0.1-beta.1"); // test fails here, it generates "5.0.0-beta.1" which is not unique and lower than "5.0.0-rc.1"
264+
}
265+
}
234266
}

0 commit comments

Comments
 (0)