1
0
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:
Joseph Frazier 2016-11-23 07:36:58 -05:00
parent ca44ee0640
commit dbedcc7aa6

View File

@ -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))']