diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-09-28 20:51:56 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-09-28 20:51:56 -0400 |
commit | 46bd94acbd10eced821827555a0ffd49a2f9cd92 (patch) | |
tree | 5b7f4893f7edfa60435946f1027b07933fe1b3cf /cmd2 | |
parent | c2b1f611be7589ac2bdae34897d0140f5df75c9f (diff) | |
download | cmd2-git-46bd94acbd10eced821827555a0ffd49a2f9cd92.tar.gz |
Added more code coverage with unit tests
Diffstat (limited to 'cmd2')
-rw-r--r-- | cmd2/cmd2.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py index 7a544850..dec0a04d 100644 --- a/cmd2/cmd2.py +++ b/cmd2/cmd2.py @@ -2573,6 +2573,10 @@ class Cmd(cmd.Cmd): if not tokens: return [] + # Must have at least 3 args for 'help command subcommand' + if len(tokens) < 3: + return [] + # Find where the command is by skipping past any flags cmd_index = 1 for cur_token in tokens[cmd_index:]: |