We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ff06a8 commit 7fda2e8Copy full SHA for 7fda2e8
1 file changed
shared-internal/src/test/kotlin/io/github/typesafegithub/workflows/shared/internal/model/VersionTest.kt
@@ -0,0 +1,23 @@
1
+package io.github.typesafegithub.workflows.shared.internal.model
2
+
3
+import io.kotest.core.spec.style.FunSpec
4
+import io.kotest.matchers.shouldBe
5
6
+class VersionTest :
7
+ FunSpec({
8
+ context("isMajorVersion") {
9
+ listOf(
10
+ Pair("v1.2.3", false),
11
+ Pair("v1.2", false),
12
+ Pair("v3", true),
13
+ Pair("V3", true),
14
+ // Incorrect behavior, will be fixed in https://github.com/typesafegithub/github-workflows-kt/issues/1670
15
+ Pair("v3-prerelease", true),
16
+ Pair("beta-v3", true),
17
+ ).forEach { (version, isMajor) ->
18
+ test("isMajorVersion works correctly for $version") {
19
+ Version(version).isMajorVersion() shouldBe isMajor
20
+ }
21
22
23
+ })
0 commit comments