Skip to content

Commit bd84b42

Browse files
committed
Added more code coverage
1 parent d2f6246 commit bd84b42

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/test_completion.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -939,6 +939,15 @@ def test_cmd2_help_subcommand_completion_multiple_scu(scu_app):
939939
first_match = complete_tester(text, line, begidx, endidx, scu_app)
940940
assert first_match is not None and scu_app.completion_matches == ['bar', 'foo', 'sport']
941941

942+
def test_cmd2_help_subcommand_completion_with_flags_before_command(scu_app):
943+
text = ''
944+
line = 'help -h -v base {}'.format(text)
945+
endidx = len(line)
946+
begidx = endidx - len(text)
947+
948+
first_match = complete_tester(text, line, begidx, endidx, scu_app)
949+
assert first_match is not None and scu_app.completion_matches == ['bar', 'foo', 'sport']
950+
942951

943952
def test_cmd2_help_subcommand_completion_nomatch_scu(scu_app):
944953
text = 'z'

0 commit comments

Comments
 (0)