diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2019-03-17 10:51:03 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-17 10:51:03 -0400 |
commit | 47dce297681f799c51a65b3e8420bf0c551c779b (patch) | |
tree | 6c67e6f12bef2088dd9f13b511e15e1ce2f1deae /tests/test_parsing.py | |
parent | 0144d8ea95305b73f43d41de25389b91a30cb4e1 (diff) | |
parent | cf7cb0c2774aae1052017a54d30c0b4252d34464 (diff) | |
download | cmd2-git-47dce297681f799c51a65b3e8420bf0c551c779b.tar.gz |
Merge pull request #649 from python-cmd2/cmd_line
Cmd line
Diffstat (limited to 'tests/test_parsing.py')
-rw-r--r-- | tests/test_parsing.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_parsing.py b/tests/test_parsing.py index 85ee0765..8cea3305 100644 --- a/tests/test_parsing.py +++ b/tests/test_parsing.py @@ -471,11 +471,18 @@ def test_empty_statement_raises_exception(): ('l', 'shell', 'ls -al') ]) def test_parse_alias_and_shortcut_expansion(parser, line, command, args): + # Test first with expansion statement = parser.parse(line) assert statement.command == command assert statement == args assert statement.args == statement + # Now allow no expansion + statement = parser.parse(line, expand=False) + assert statement.command == line.split()[0] + assert statement.split() == line.split()[1:] + assert statement.args == statement + def test_parse_alias_on_multiline_command(parser): line = 'anothermultiline has > inside an unfinished command' statement = parser.parse(line) |