]> git.frustrated-labs.net Git - gradle-changelog-plugin.git/commitdiff
tests: add test to make sure we support the "Unreleased" version
authorAlexander Goussas <[email protected]>
Fri, 24 Oct 2025 20:28:26 +0000 (15:28 -0500)
committerAlexander Goussas <[email protected]>
Sun, 26 Oct 2025 04:02:02 +0000 (23:02 -0500)
changelog-plugin/src/test/kotlin/io/github/aloussase/changelog/parser/MarkdownChangelogParserTests.kt

index e9c6dc82af7950bd5e40a0afd4747d8d7375f132..cf5a92bb528ef865e5f808d7baadde846496e6a0 100644 (file)
@@ -107,4 +107,15 @@ class MarkdownChangelogParserTests {
         assertThat(result.exceptionOrNull()?.message, containsString("Expected a valid commit"))
     }
 
+    @Test
+    fun givenDocumentWithReleaseNameUnreleasedWhenParseIsCalledThenDocumentIsParsedCorrectly() {
+        val doc = "# Changelog\n\n## [Unreleased]\n- LOYMAR-123: first commit ([email protected])"
+        val parser = MarkdownChangelogParser()
+
+        val result = parser.parse(doc)
+
+        assertThat(result.isSuccess, equalTo(true))
+        assertThat(result.getOrThrow().entries.first().release, equalTo("Unreleased"))
+    }
+
 }