From dbedcc7aa6a6a1df1b6ea3775c1a7bac5f8fbdc8 Mon Sep 17 00:00:00 2001 From: Joseph Frazier <1212jtraceur@gmail.com> Date: Wed, 23 Nov 2016 07:36:58 -0500 Subject: [PATCH] Test parsing bash arithmetic expressions --- tests/shells/test_bash.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/shells/test_bash.py b/tests/shells/test_bash.py index a38aff77..c4268c04 100644 --- a/tests/shells/test_bash.py +++ b/tests/shells/test_bash.py @@ -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))']