31 lines · python
1# -*- coding: utf-8 -*-2"""3Test unicode handling in LLDB.4"""5 6import os7 8import lldb9from lldbsuite.test.decorators import *10from lldbsuite.test.lldbtest import *11from lldbsuite.test.lldbpexpect import PExpectTest12 13 14class TestCase(PExpectTest):15 # PExpect uses many timeouts internally and doesn't play well16 # under ASAN on a loaded machine..17 @skipIfAsan18 @skipIf(oslist=["linux"], archs=["arm$", "aarch64"]) # Randomly fails on buildbot19 @skipIfEditlineWideCharSupportMissing20 def test_unicode_input(self):21 self.launch()22 23 # Send some unicode input to LLDB.24 # We should get back that this is an invalid command with our character as UTF-8.25 self.expect(26 "\u1234",27 substrs=["error: '\u1234' is not a valid command.".encode("utf-8")],28 )29 30 self.quit()31