mirror of
https://github.com/nvbn/thefuck.git
synced 2025-01-18 20:11:17 +00:00
Test parsing bash arithmetic expressions
This commit is contained in:
parent
ca44ee0640
commit
dbedcc7aa6
@ -61,3 +61,8 @@ class TestBash(object):
|
||||
command = 'git log $(git ls-files thefuck | grep python_command) -p'
|
||||
command_parts = ['git', 'log', '$(git ls-files thefuck | grep python_command)', '-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))']
|
||||
|
Loading…
x
Reference in New Issue
Block a user