xref: /llvm-project/lldb/test/API/functionalities/multiword-commands/TestMultiWordCommands.py (revision 2238dcc39358353cac21df75c3c3286ab20b8f53)
199451b44SJordan Rupprecht"""
299451b44SJordan RupprechtTest multiword commands ('platform' in this case).
399451b44SJordan Rupprecht"""
499451b44SJordan Rupprecht
599451b44SJordan Rupprechtimport lldb
699451b44SJordan Rupprechtfrom lldbsuite.test.decorators import *
799451b44SJordan Rupprechtfrom lldbsuite.test.lldbtest import *
899451b44SJordan Rupprecht
999451b44SJordan Rupprecht
10*2238dcc3SJonas Devlieghereclass MultiwordCommandsTestCase(TestBase):
1199451b44SJordan Rupprecht    @no_debug_info_test
1299451b44SJordan Rupprecht    def test_ambiguous_subcommand(self):
13*2238dcc3SJonas Devlieghere        self.expect(
14*2238dcc3SJonas Devlieghere            "platform s",
15*2238dcc3SJonas Devlieghere            error=True,
16*2238dcc3SJonas Devlieghere            substrs=[
17*2238dcc3SJonas Devlieghere                "ambiguous command 'platform s'. Possible completions:",
1899451b44SJordan Rupprecht                "\tselect\n",
1999451b44SJordan Rupprecht                "\tsettings\n",
20*2238dcc3SJonas Devlieghere                "\tshell\n",
21*2238dcc3SJonas Devlieghere            ],
22*2238dcc3SJonas Devlieghere        )
2399451b44SJordan Rupprecht
2499451b44SJordan Rupprecht    @no_debug_info_test
2599451b44SJordan Rupprecht    def test_empty_subcommand(self):
26*2238dcc3SJonas Devlieghere        self.expect(
27*2238dcc3SJonas Devlieghere            'platform ""',
28*2238dcc3SJonas Devlieghere            error=True,
29*2238dcc3SJonas Devlieghere            substrs=["Need to specify a non-empty subcommand."],
30*2238dcc3SJonas Devlieghere        )
31