1import lldb
2from lldbsuite.test.lldbtest import *
3from lldbsuite.test.decorators import *
4
5class AproposTestCase(TestBase):
6
7    @no_debug_info_test
8    def test_apropos(self):
9        self.expect("apropos", error=True,
10                    substrs=[' must be called with exactly one argument'])
11        self.expect("apropos a b", error=True,
12                    substrs=[' must be called with exactly one argument'])
13        self.expect("apropos ''", error=True,
14                    substrs=['\'\' is not a valid search word'])
15
16    @no_debug_info_test
17    def test_apropos_variable(self):
18        """Test that 'apropos variable' prints the fully qualified command name"""
19        self.expect(
20            'apropos variable',
21            substrs=[
22                'frame variable',
23                'target variable',
24                'watchpoint set variable'])
25