summaryrefslogtreecommitdiff
path: root/tests/test_pyscript.py
diff options
context:
space:
mode:
authorkmvanbrunt <kmvanbrunt@gmail.com>2018-10-11 14:07:50 -0400
committerGitHub <noreply@github.com>2018-10-11 14:07:50 -0400
commit473cb08237b402658e857d786d5294defe721ec7 (patch)
tree322051b16a75531aa8015c494b3f17c5caafee60 /tests/test_pyscript.py
parentf38e100fd77f4a136a4883d23b2f4f8b3cd934b7 (diff)
parent8bed2448ede91fc5cb7d8ff1044a75650350810e (diff)
downloadcmd2-git-473cb08237b402658e857d786d5294defe721ec7.tar.gz
Merge pull request #573 from python-cmd2/double_dash
Double dash
Diffstat (limited to 'tests/test_pyscript.py')
-rw-r--r--tests/test_pyscript.py5
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")')