1
0
mirror of https://github.com/nvbn/thefuck.git synced 2024-10-06 10:51:11 +01:00
thefuck/tests/rules/test_tmux.py

20 lines
597 B
Python
Raw Normal View History

2015-07-04 13:17:33 +01:00
import pytest
from thefuck.rules.tmux import match, get_new_command
from tests.utils import Command
@pytest.fixture
def tmux_ambiguous():
return "ambiguous command: list, could be: " \
"list-buffers, list-clients, list-commands, list-keys, " \
"list-panes, list-sessions, list-windows"
def test_match(tmux_ambiguous):
assert match(Command('tmux list', stderr=tmux_ambiguous))
2015-07-04 13:17:33 +01:00
def test_get_new_command(tmux_ambiguous):
assert get_new_command(Command('tmux list', stderr=tmux_ambiguous))\
2015-07-31 20:48:14 +01:00
== ['tmux list-keys', 'tmux list-panes', 'tmux list-windows']