1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-10-08 12:53:58 +01:00

#701: Replace the first single occurrence of delete

This commit is contained in:
Pablo Santiago Blum de Aguiar
2017-10-08 18:54:37 -03:00
parent 3253b0e789
commit dfd0be2002
2 changed files with 9 additions and 5 deletions

View File

@@ -16,6 +16,9 @@ def test_not_match(command):
assert not match(command)
def test_get_new_command():
new_command = get_new_command(Command('git remote delete foo', ''))
assert new_command == 'git remote remove foo'
@pytest.mark.parametrize('command, new_command', [
(Command('git remote delete foo', ''), 'git remote remove foo'),
(Command('git remote delete delete', ''), 'git remote remove delete'),
])
def test_get_new_command(command, new_command):
assert get_new_command(command) == new_command