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:
@@ -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))']
|
||||
|
Reference in New Issue
Block a user