xref: /llvm-project/lldb/test/API/functionalities/gdb_remote_client/TestGDBRemoteDiskFileCompletion.py (revision 2238dcc39358353cac21df75c3c3286ab20b8f53)
1from lldbsuite.test.gdbclientutils import *
2from lldbsuite.test.lldbgdbclient import GDBPlatformClientTestBase
3
4
5class TestGDBRemoteDiskFileCompletion(GDBPlatformClientTestBase):
6    def test_autocomplete_request(self):
7        """Test remote disk completion on remote-gdb-server plugin"""
8
9        class Responder(MockGDBServerResponder):
10            def qPathComplete(self):
11                return "M{},{}".format("test".encode().hex(), "123".encode().hex())
12
13        self.server.responder = Responder()
14
15        self.complete_from_to("platform get-size ", ["test", "123"])
16        self.complete_from_to("platform get-file ", ["test", "123"])
17        self.complete_from_to("platform put-file foo ", ["test", "123"])
18        self.complete_from_to("platform file open ", ["test", "123"])
19        self.complete_from_to("platform settings -w ", ["test", "123"])
20