mirror of
https://github.com/nvbn/thefuck.git
synced 2025-03-14 14:48:49 +00:00
Added test
This commit is contained in:
parent
7fd4f3ef74
commit
a8481bdc5a
19
tests/rules/test_pacman_invalid_option.py
Normal file
19
tests/rules/test_pacman_invalid_option.py
Normal file
@ -0,0 +1,19 @@
|
||||
from thefuck.rules.pip_install import match, get_new_command
|
||||
from thefuck.types import Command
|
||||
|
||||
|
||||
def test_match():
|
||||
right_response = """
|
||||
community/shared_meataxe 1.0-3
|
||||
A set of programs for working with matrix representations over finite fields
|
||||
"""
|
||||
assert not match(Command('pacman -Ss meat', right_response))
|
||||
|
||||
wrong_response = """
|
||||
error: invalid option '-s'
|
||||
"""
|
||||
assert match(Command('pacman -ss meat', wrong_response))
|
||||
|
||||
def test_get_new_command():
|
||||
assert get_new_command(Command('pacman -ss meat', '')) == 'pacman -Ss meat'
|
||||
assert get_new_command(Command('pacman -s meat', '')) == 'pacman -S meat'
|
Loading…
x
Reference in New Issue
Block a user