This is an ongoing series of commits that are reformatting our Python code. Reformatting is done with `black` (23.1.0). If you end up having problems merging this commit because you have made changes to a python file, the best way to handle that is to run `git checkout --ours <yourfile>` and then reformat it with black. RFC: https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style Differential revision: https://reviews.llvm.org/D151460
30 lines
799 B
Python
30 lines
799 B
Python
# -*- coding: utf-8 -*-
|
|
"""
|
|
Test unicode handling in LLDB.
|
|
"""
|
|
|
|
import os
|
|
|
|
import lldb
|
|
from lldbsuite.test.decorators import *
|
|
from lldbsuite.test.lldbtest import *
|
|
from lldbsuite.test.lldbpexpect import PExpectTest
|
|
|
|
|
|
class TestCase(PExpectTest):
|
|
# PExpect uses many timeouts internally and doesn't play well
|
|
# under ASAN on a loaded machine..
|
|
@skipIfAsan
|
|
@skipIf(oslist=["linux"], archs=["arm", "aarch64"]) # Randomly fails on buildbot
|
|
def test_unicode_input(self):
|
|
self.launch()
|
|
|
|
# Send some unicode input to LLDB.
|
|
# We should get back that this is an invalid command with our character as UTF-8.
|
|
self.expect(
|
|
"\u1234",
|
|
substrs=["error: '\u1234' is not a valid command.".encode("utf-8")],
|
|
)
|
|
|
|
self.quit()
|