Commit 9c65b908 authored by Tristan Van Berkom's avatar Tristan Van Berkom

tests/completions: Added test case for custom `bst help` completions

parent 8234e9c7
Pipeline #23443537 failed with stages
in 27 minutes and 52 seconds
......@@ -217,3 +217,16 @@ def test_argument_element(datafiles, cli, project, cmd, word_idx, expected, subd
if subdir:
cwd = os.path.join(cwd, subdir)
assert_completion(cli, cmd, word_idx, expected, cwd=cwd)
@pytest.mark.parametrize("cmd,word_idx,expected", [
('bst he', 1, ['help ']),
('bst help ', 2, MAIN_COMMANDS),
('bst help fe', 2, ['fetch ']),
('bst help p', 2, ['pull ', 'push ']),
('bst help p', 2, ['pull ', 'push ']),
('bst help w', 2, ['workspace ']),
('bst help workspace ', 3, WORKSPACE_COMMANDS),
])
def test_help_commands(cli, cmd, word_idx, expected):
assert_completion(cli, cmd, word_idx, expected)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment