From ce27861821e2cf6db08ad4e3861f980dc8e391b5 Mon Sep 17 00:00:00 2001 From: codex-bot-andresmgsl <304681515+codex-bot-andresmgsl@users.noreply.github.com> Date: Fri, 24 Jul 2026 00:26:48 +0000 Subject: [PATCH] test: cover absent Unreleased section --- test/changelog.test.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/changelog.test.sh b/test/changelog.test.sh index 796a50f..99ededb 100755 --- a/test/changelog.test.sh +++ b/test/changelog.test.sh @@ -128,6 +128,17 @@ assert_problem 1.5.0 1 "section '1.5.0' has no entries — a heading is not an e assert_problem 1.6.0 1 "section '1.6.0' has an empty heading: '### Added'" assert_problem 9.9.9 1 "no section for '9.9.9'" +MISSING_UNRELEASED_FIXTURE="$TMP/CHANGELOG.missing-unreleased.md" +cat >"$MISSING_UNRELEASED_FIXTURE" <<'EOF' +# Changelog + +## 1.0.0 + +- Released entry. +EOF +check "predicate: absent Unreleased still refuses" 1 "no section for 'Unreleased'" \ + changelog_section_problem "$MISSING_UNRELEASED_FIXTURE" Unreleased + WRAPPER="$ROOT/bin/changelog-section" check "wrapper publishes the requested body" 0 "The seven-oh entry" "$WRAPPER" 0.7.0 "$FIXTURE" check "wrapper refuses an empty section" 1 "no section for '0.5.0'" "$WRAPPER" 0.5.0 "$FIXTURE"