summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2018-09-28 18:25:46 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2018-09-28 18:25:46 -0400
commitbd84b4234442c03a29dd096d85bda13af56f603a (patch)
tree8061402f07893107f26329c5c5bc5283b4fd0667 /tests
parentd2f624649341a302238e981865eef844424d8288 (diff)
downloadcmd2-git-bd84b4234442c03a29dd096d85bda13af56f603a.tar.gz
Added more code coverage
Diffstat (limited to 'tests')
-rw-r--r--tests/test_completion.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_completion.py b/tests/test_completion.py
index b1ca80b8..e26b8a2f 100644
--- a/tests/test_completion.py
+++ b/tests/test_completion.py
@@ -939,6 +939,15 @@ def test_cmd2_help_subcommand_completion_multiple_scu(scu_app):
first_match = complete_tester(text, line, begidx, endidx, scu_app)
assert first_match is not None and scu_app.completion_matches == ['bar', 'foo', 'sport']
+def test_cmd2_help_subcommand_completion_with_flags_before_command(scu_app):
+ text = ''
+ line = 'help -h -v base {}'.format(text)
+ endidx = len(line)
+ begidx = endidx - len(text)
+
+ first_match = complete_tester(text, line, begidx, endidx, scu_app)
+ assert first_match is not None and scu_app.completion_matches == ['bar', 'foo', 'sport']
+
def test_cmd2_help_subcommand_completion_nomatch_scu(scu_app):
text = 'z'