import subprocess
import sys


def test_imports():
    from apt_suggest_auto.cli import get_manual_installed_packages
    from apt_suggest_auto.cli import identify_markable_packages
    from apt_suggest_auto.cli import check_root_privileges
    from apt_suggest_auto.cli import main


def test_raw_mode():
    result = subprocess.run(
        [sys.executable, "-m", "apt_suggest_auto.cli", "--raw"],
        capture_output=True,
        text=True,
    )
    assert result.returncode == 0
    for line in result.stdout.strip().splitlines():
        assert line  # non-empty package names