diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-10-10 19:40:18 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-10-10 19:40:18 -0400 |
commit | 1824a4e841d3480b0ae819c448b38f983297bdd9 (patch) | |
tree | 77acb096e03b3ef846e5ff1b2fd668caed49fc3b /tests/test_pyscript.py | |
parent | ebd6668db1a4a1dfcf2937559f2fbe5a4f58dc48 (diff) | |
download | cmd2-git-1824a4e841d3480b0ae819c448b38f983297bdd9.tar.gz |
Fixed ArgparseFunctor to allow flag looking tokens in REMAINDER sections
Diffstat (limited to 'tests/test_pyscript.py')
-rw-r--r-- | tests/test_pyscript.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_pyscript.py b/tests/test_pyscript.py index bcb72a3b..ce5e267d 100644 --- a/tests/test_pyscript.py +++ b/tests/test_pyscript.py @@ -238,9 +238,10 @@ def test_pyscript_custom_name(ps_echo, request): def test_pyscript_argparse_checks(ps_app, capsys): # Test command that has nargs.REMAINDER and make sure all tokens are accepted - run_cmd(ps_app, 'py app.alias.create("my_alias", "alias_command", "command_arg1", "command_arg2")') + # Include a flag in the REMAINDER section to show that they are processed as literals in that section + run_cmd(ps_app, 'py app.alias.create("my_alias", "alias_command", "command_arg1", "-h")') out = run_cmd(ps_app, 'alias list my_alias') - assert out == normalize('alias create my_alias alias_command command_arg1 command_arg2') + assert out == normalize('alias create my_alias alias_command command_arg1 -h') # Specify flag outside of keyword argument run_cmd(ps_app, 'py app.help("-h")') |