From: Alexander Goussas Date: Fri, 24 Oct 2025 20:28:26 +0000 (-0500) Subject: tests: add test to make sure we support the "Unreleased" version X-Git-Url: http://git.frustrated-labs.net/?a=commitdiff_plain;h=1bdd7262010387818c22d1d9a00ae0d8f4fff8db;p=gradle-changelog-plugin.git tests: add test to make sure we support the "Unreleased" version --- diff --git a/changelog-plugin/src/test/kotlin/io/github/aloussase/changelog/parser/MarkdownChangelogParserTests.kt b/changelog-plugin/src/test/kotlin/io/github/aloussase/changelog/parser/MarkdownChangelogParserTests.kt index e9c6dc8..cf5a92b 100644 --- a/changelog-plugin/src/test/kotlin/io/github/aloussase/changelog/parser/MarkdownChangelogParserTests.kt +++ b/changelog-plugin/src/test/kotlin/io/github/aloussase/changelog/parser/MarkdownChangelogParserTests.kt @@ -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 (johndoe@gmail.com)" + val parser = MarkdownChangelogParser() + + val result = parser.parse(doc) + + assertThat(result.isSuccess, equalTo(true)) + assertThat(result.getOrThrow().entries.first().release, equalTo("Unreleased")) + } + }