Add a couple of simple completion test cases for 'target ' and 'target va'.

llvm-svn: 149656
This commit is contained in:
Johnny Chen 2012-02-03 01:14:42 +00:00
parent bb682450f9
commit 60b4f13c11
1 changed files with 11 additions and 0 deletions

View File

@ -102,6 +102,17 @@ class CommandLineCompletionTestCase(TestBase):
'target.process.thread.step-avoid-regexp',
'target.process.thread.trace-thread'])
def test_target_space(self):
"""Test that 'target ' completes to ['Available completions:', 'create', 'delete', 'list',
'modules', 'select', 'stop-hook', 'variable']."""
self.complete_from_to('target ',
['Available completions:', 'create', 'delete', 'list',
'modules', 'select', 'stop-hook', 'variable'])
def test_target_va(self):
"""Test that 'target va' completes to 'target variable '."""
self.complete_from_to('target va', 'target variable ')
def complete_from_to(self, str_input, patterns):
"""Test that the completion mechanism completes str_input to patterns,
where patterns could be a pattern-string or a list of pattern-strings"""