diff options
author | kotfu <jared@kotfu.net> | 2018-05-02 20:27:14 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-02 20:27:14 -0600 |
commit | 6b5c23c127e78ca4f9e30a1cbea76c61f10e418c (patch) | |
tree | 07ebf6b0b51227800b287a6d26d1951d449cbde6 /tests/test_completion.py | |
parent | d37004d05d0be67f48f35d6986ea899a35bcf89f (diff) | |
parent | fa94eed90cf81b24e5b83c2b4c7e16025d849996 (diff) | |
download | cmd2-git-6b5c23c127e78ca4f9e30a1cbea76c61f10e418c.tar.gz |
Merge pull request #370 from python-cmd2/ply
Switch parsing logic from pyparsing to shlex
Diffstat (limited to 'tests/test_completion.py')
-rw-r--r-- | tests/test_completion.py | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/tests/test_completion.py b/tests/test_completion.py index 7026db48..a027d780 100644 --- a/tests/test_completion.py +++ b/tests/test_completion.py @@ -582,44 +582,6 @@ def test_tokens_for_completion_redirect_off(cmd2_app): assert expected_tokens == tokens assert expected_raw_tokens == raw_tokens -def test_parseline_command_and_args(cmd2_app): - line = 'help history' - command, args, out_line = cmd2_app.parseline(line) - assert command == 'help' - assert args == 'history' - assert line == out_line - -def test_parseline_emptyline(cmd2_app): - line = '' - command, args, out_line = cmd2_app.parseline(line) - assert command is None - assert args is None - assert line is out_line - -def test_parseline_strips_line(cmd2_app): - line = ' help history ' - command, args, out_line = cmd2_app.parseline(line) - assert command == 'help' - assert args == 'history' - assert line.strip() == out_line - -def test_parseline_expands_alias(cmd2_app): - # Create the alias - cmd2_app.do_alias(['fake', 'pyscript']) - - line = 'fake foobar.py' - command, args, out_line = cmd2_app.parseline(line) - assert command == 'pyscript' - assert args == 'foobar.py' - assert line.replace('fake', 'pyscript') == out_line - -def test_parseline_expands_shortcuts(cmd2_app): - line = '!cat foobar.txt' - command, args, out_line = cmd2_app.parseline(line) - assert command == 'shell' - assert args == 'cat foobar.txt' - assert line.replace('!', 'shell ') == out_line - def test_add_opening_quote_basic_no_text(cmd2_app): text = '' line = 'test_basic {}'.format(text) |