mirror of
https://github.com/nvbn/thefuck.git
synced 2025-03-21 10:08:59 +00:00
Adds a rule to append '.install' to a chocolatey install command that failed because of a non-existent package. TODO: add support for other suffixes (.portable), find more parameter cases
13 lines
519 B
Python
13 lines
519 B
Python
import pytest
|
|
from thefuck.rules.choco_install import get_new_command
|
|
from thefuck.types import Command
|
|
|
|
|
|
@pytest.mark.parametrize('before, after', [
|
|
('choco install logstitcher', 'choco install logstitcher.install'),
|
|
('cinst logstitcher', 'cinst logstitcher.install'),
|
|
('choco install logstitcher -y', 'choco install logstitcher.install -y'),
|
|
('cinst logstitcher -y', 'cinst logstitcher.install -y')])
|
|
def test_get_new_command(before, after):
|
|
assert (get_new_command(Command(before, '')) == after)
|