File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
shared-internal/src/test/kotlin/io/github/typesafegithub/workflows/shared/internal/model Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change
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
+ })
You can’t perform that action at this time.
0 commit comments