summaryrefslogtreecommitdiff
path: root/tests/test_completion.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2018-03-26 04:44:25 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2018-03-26 04:44:25 -0400
commitf5e009e3c3fcbc87fead5d9c204ffebe3d4149db (patch)
treec409b330a3a97357aad2eb5fdbe748b17db129a8 /tests/test_completion.py
parenteb851f40287b93ed8e224046c215888b39b5ad8a (diff)
downloadcmd2-git-f5e009e3c3fcbc87fead5d9c204ffebe3d4149db.tar.gz
Fixed indexing bug and unit test
Diffstat (limited to 'tests/test_completion.py')
-rw-r--r--tests/test_completion.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_completion.py b/tests/test_completion.py
index 31f218bf..a68bea43 100644
--- a/tests/test_completion.py
+++ b/tests/test_completion.py
@@ -222,9 +222,9 @@ def test_shell_command_completion_nomatch(cmd2_app):
def test_shell_command_completion_doesnt_complete_when_just_shell(cmd2_app):
text = ''
- line = 'shell'
+ line = 'shell {}'.format(text)
endidx = len(line)
- begidx = 0
+ begidx = endidx - len(text)
assert cmd2_app.complete_shell(text, line, begidx, endidx) == []
def test_shell_command_completion_does_path_completion_when_after_command(cmd2_app, request):