"""Tests for wideholy.cli — command-line interface."""

from __future__ import annotations

from typer.testing import CliRunner

from wideholy.cli import app

runner = CliRunner()


class TestCLI:
    """Verify CLI app structure and help output."""

    def test_help(self) -> None:
        result = runner.invoke(app, ["--help"])
        assert result.exit_code == 0
        assert "Cross-religion scripture" in result.stdout

    def test_votd_help(self) -> None:
        result = runner.invoke(app, ["votd", "--help"])
        assert result.exit_code == 0
        assert "verse of the day" in result.stdout.lower()

    def test_compare_help(self) -> None:
        result = runner.invoke(app, ["compare", "--help"])
        assert result.exit_code == 0
        assert "Compare" in result.stdout

    def test_search_help(self) -> None:
        result = runner.invoke(app, ["search", "--help"])
        assert result.exit_code == 0

    def test_calendar_help(self) -> None:
        result = runner.invoke(app, ["calendar", "--help"])
        assert result.exit_code == 0
        assert "religion" in result.stdout.lower()

    def test_commentary_help(self) -> None:
        result = runner.invoke(app, ["commentary", "--help"])
        assert result.exit_code == 0

    def test_topic_help(self) -> None:
        result = runner.invoke(app, ["topic", "--help"])
        assert result.exit_code == 0

    def test_cross_religion_help(self) -> None:
        result = runner.invoke(app, ["cross-religion", "--help"])
        assert result.exit_code == 0
