diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2019-03-17 10:53:21 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-17 10:53:21 -0400 |
commit | e28bce263802b94a79c974ddc2540075eb5301a2 (patch) | |
tree | b1fba35bc42562fd2cfa63b69059a666cfd5d558 /tests/test_parsing.py | |
parent | 3b6ed1151bc417633d2207d9ed1e20b491a4ef24 (diff) | |
parent | 47dce297681f799c51a65b3e8420bf0c551c779b (diff) | |
download | cmd2-git-e28bce263802b94a79c974ddc2540075eb5301a2.tar.gz |
Merge branch 'master' into attributes
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) |