mirror of
https://github.com/nvbn/thefuck.git
synced 2025-10-07 12:23:59 +01:00
@@ -143,7 +143,9 @@ class TestCommand(object):
|
|||||||
([''], None),
|
([''], None),
|
||||||
(['', ''], None),
|
(['', ''], None),
|
||||||
(['ls', '-la'], 'ls -la'),
|
(['ls', '-la'], 'ls -la'),
|
||||||
(['ls'], 'ls')])
|
(['ls'], 'ls'),
|
||||||
|
(['echo \\ '], 'echo \\ '),
|
||||||
|
(['echo \\\n'], 'echo \\\n')])
|
||||||
def test_from_script(self, script, result):
|
def test_from_script(self, script, result):
|
||||||
if result:
|
if result:
|
||||||
assert Command.from_raw_script(script).script == result
|
assert Command.from_raw_script(script).script == result
|
||||||
|
@@ -344,4 +344,4 @@ def format_raw_script(raw_script):
|
|||||||
else:
|
else:
|
||||||
script = ' '.join(raw_script)
|
script = ' '.join(raw_script)
|
||||||
|
|
||||||
return script.strip()
|
return script.lstrip()
|
||||||
|
Reference in New Issue
Block a user