1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-10-30 14:44:05 +00:00

Adding rule for trying to search using apt-get

This commit is contained in:
Bastian Gebhardt
2015-08-20 00:23:33 +02:00
parent 5ab2cf646e
commit 2b3e8dc62a
3 changed files with 30 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
import pytest
from thefuck.rules.apt_get_search import get_new_command, match
from tests.utils import Command
def test_match():
assert match(Command('apt-get search foo'), None)
@pytest.mark.parametrize('command', [
Command('apt-cache search foo'),
Command('aptitude search foo'),
Command('apt search foo')
])
def test_not_match(command):
assert not match(command, None)
def test_get_new_command():
assert get_new_command(Command('apt-get search foo'), None) == 'apt-cache search foo'