From f5e009e3c3fcbc87fead5d9c204ffebe3d4149db Mon Sep 17 00:00:00 2001 From: Kevin Van Brunt Date: Mon, 26 Mar 2018 04:44:25 -0400 Subject: Fixed indexing bug and unit test --- tests/test_completion.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/test_completion.py') 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): -- cgit v1.2.1