1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-10-30 06:34:09 +00:00

Fix the unzip rules and filenames with spaces

This commit is contained in:
mcarton
2015-10-28 15:13:33 +01:00
parent 0a6a3db65d
commit 280751b36e
2 changed files with 5 additions and 2 deletions

View File

@@ -43,6 +43,8 @@ def test_side_effect(zip_error, script):
@pytest.mark.parametrize('script,fixed', [
('unzip foo', 'unzip foo -d foo'),
(R"unzip foo\ bar.zip", R"unzip foo\ bar.zip -d 'foo bar'"),
(R"unzip 'foo bar.zip'", R"unzip 'foo bar.zip' -d 'foo bar'"),
('unzip foo.zip', 'unzip foo.zip -d foo')])
def test_get_new_command(zip_error, script, fixed):
assert get_new_command(Command(script=script)) == fixed