readcon-core 0.20.0

An oxidized single and multiple CON file reader and writer with FFI bindings for ergonomic C/C++ usage. Implements CON spec v3.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
"""Heading capture keeps a pre-release suffix."""

from __future__ import annotations

import sys
from pathlib import Path

sys.path.insert(0, str(Path(__file__).resolve().parents[2] / "scripts"))

from version_sot import VERSION_PATTERN, accept_version, changelog_headings, heading_re


def test_prerelease_suffix_survives_the_heading_check():
    accept_version("1.0.0-rc1")
    text = "## v1.0.0-rc1 - 2026-11-02\n## v9.9.9 - 2026-10-31\n"
    assert changelog_headings(text) == ["v1.0.0-rc1", "v9.9.9"]
    assert heading_re().pattern == rf"(?m)^## (v{VERSION_PATTERN})\b"