mirror of
https://github.com/nvbn/thefuck.git
synced 2025-03-20 01:28:56 +00:00
More Travis
This commit is contained in:
parent
c157272945
commit
dad2db9da1
@ -1,15 +1,16 @@
|
|||||||
import pytest
|
from thefuck.rules.pacman_invalid_option import get_new_command, match
|
||||||
from thefuck.rules.pacman import get_new_command, match
|
|
||||||
from thefuck.types import Command
|
from thefuck.types import Command
|
||||||
|
|
||||||
good_output = "community/shared_meataxe 1.0-3\n A set of programs for working with matrix representations over finite fields\n "
|
good_output = "community/shared_meataxe 1.0-3\n A set of programs for working with matrix representations over finite fields\n "
|
||||||
|
|
||||||
bad_output = "error: invalid option '-s'"
|
bad_output = "error: invalid option '-s'"
|
||||||
|
|
||||||
|
|
||||||
def test_match():
|
def test_match():
|
||||||
assert match(Command('pacman -Ss meat', good_output))
|
assert match(Command('pacman -Ss meat', good_output))
|
||||||
assert match(Command('sudo pacman -Ss meat', good_output))
|
assert match(Command('sudo pacman -Ss meat', good_output))
|
||||||
|
|
||||||
|
|
||||||
def test_get_new_command():
|
def test_get_new_command():
|
||||||
new_command = get_new_command(Command('pacman -ss meat', bad_output))
|
new_command = get_new_command(Command('pacman -ss meat', bad_output))
|
||||||
assert new_command == 'pacman -Ss meat'
|
assert new_command == 'pacman -Ss meat'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user