13cd8d7b1SGongyu Dengfrom gdbclientutils import * 23cd8d7b1SGongyu Deng 3*c240d2bbSMichał Górnyclass TestGDBRemoteDiskFileCompletion(GDBPlatformClientTestBase): 43cd8d7b1SGongyu Deng 53cd8d7b1SGongyu Deng def test_autocomplete_request(self): 63cd8d7b1SGongyu Deng """Test remote disk completion on remote-gdb-server plugin""" 73cd8d7b1SGongyu Deng 83cd8d7b1SGongyu Deng class Responder(MockGDBServerResponder): 93cd8d7b1SGongyu Deng def qPathComplete(self): 103cd8d7b1SGongyu Deng return "M{},{}".format( 113cd8d7b1SGongyu Deng "test".encode().hex(), 123cd8d7b1SGongyu Deng "123".encode().hex() 133cd8d7b1SGongyu Deng ) 143cd8d7b1SGongyu Deng 153cd8d7b1SGongyu Deng self.server.responder = Responder() 163cd8d7b1SGongyu Deng 173cd8d7b1SGongyu Deng self.complete_from_to('platform get-size ', ['test', '123']) 183cd8d7b1SGongyu Deng self.complete_from_to('platform get-file ', ['test', '123']) 193cd8d7b1SGongyu Deng self.complete_from_to('platform put-file foo ', ['test', '123']) 203cd8d7b1SGongyu Deng self.complete_from_to('platform file open ', ['test', '123']) 213cd8d7b1SGongyu Deng self.complete_from_to('platform settings -w ', ['test', '123']) 22