from pathlib import Path


def workspace_root_path() -> Path:
    return Path(__file__).resolve().parents[3]


def test_language_reference_policy_doc_exists() -> None:
    language_reference_policy_path = workspace_root_path() / "docs" / "LANGUAGE_REFERENCE_POLICY.md"

    assert language_reference_policy_path.exists()


def test_read_order_references_language_reference_policy() -> None:
    read_order_path = workspace_root_path() / "docs" / "READ_ORDER.md"
    read_order_text = read_order_path.read_text(encoding="utf-8")

    assert "LANGUAGE_REFERENCE_POLICY.md" in read_order_text
