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

#588: Stop using bashlex

This commit is contained in:
Vladimir Iakovlev
2017-01-11 14:58:50 +01:00
parent 03a828d586
commit a778ea6203
3 changed files with 5 additions and 20 deletions

View File

@@ -58,11 +58,6 @@ class TestBash(object):
assert list(shell.get_history()) == ['ls', 'rm']
def test_split_command(self, shell):
command = 'git log $(git ls-files thefuck | grep python_command) -p'
command_parts = ['git', 'log', '$(git ls-files thefuck | grep python_command)', '-p']
command = 'git log -p'
command_parts = ['git', 'log', '-p']
assert shell.split_command(command) == command_parts
# bashlex doesn't support parsing arithmetic expressions, so make sure
# shlex is used a fallback
# See https://github.com/idank/bashlex#limitations
assert shell.split_command('$((1 + 2))') == ['$((1', '+', '2))']