"""Tests for the prompt command.""" import pytest from mudlib.commands.prompt import cmd_prompt from mudlib.prompt import render_prompt @pytest.fixture def player(mock_reader, mock_writer): from mudlib.player import Player return Player(name="TestPlayer", x=5, y=5, reader=mock_reader, writer=mock_writer) @pytest.mark.asyncio async def test_prompt_bare_shows_current_and_variables(player): """prompt with no args shows current template and available variables.""" await cmd_prompt(player, "") output = "".join([call[0][0] for call in player.writer.write.call_args_list]) assert "current" in output.lower() assert "variables" in output.lower() or "available" in output.lower() # Should list some variables assert "stamina" in output.lower() @pytest.mark.asyncio async def test_prompt_set_custom_template(player): """prompt