1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-09-20 12:12:38 +01:00

Add a tmux rule

This commit is contained in:
mcarton
2015-07-04 14:17:33 +02:00
parent cb33c912e5
commit 3822f62d90
3 changed files with 35 additions and 1 deletions

19
tests/rules/test_tmux.py Normal file
View File

@@ -0,0 +1,19 @@
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), None)
def test_get_new_command(tmux_ambiguous):
assert get_new_command(Command('tmux list', stderr=tmux_ambiguous), None)\
== 'tmux list-buffers'