Skip to content

Commit a082ffb

Browse files
committed
[lldb] Add config and decorator for wide character support in Editline (llvm#66447)
Add a configuration entry for whether LLDB was configured with wide character support in Editline and use it in a decorator to guard the UTF-8 prompt test. (cherry picked from commit 111bc6f)
1 parent 8dcef20 commit a082ffb

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

lldb/packages/Python/lldbsuite/test/decorators.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,6 +1102,10 @@ def skipIfEditlineSupportMissing(func):
11021102
return _get_bool_config_skip_if_decorator("editline")(func)
11031103

11041104

1105+
def skipIfEditlineWideCharSupportMissing(func):
1106+
return _get_bool_config_skip_if_decorator("editline_wchar")(func)
1107+
1108+
11051109
def skipIfFBSDVMCoreSupportMissing(func):
11061110
return _get_bool_config_skip_if_decorator("fbsdvmcore")(func)
11071111

lldb/source/API/SBDebugger.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -781,6 +781,9 @@ SBStructuredData SBDebugger::GetBuildConfiguration() {
781781
AddBoolConfigEntry(
782782
*config_up, "editline", LLDB_ENABLE_LIBEDIT,
783783
"A boolean value that indicates if editline support is enabled in LLDB");
784+
AddBoolConfigEntry(*config_up, "editline_wchar", LLDB_EDITLINE_USE_WCHAR,
785+
"A boolean value that indicates if editline wide "
786+
"characters support is enabled in LLDB");
784787
AddBoolConfigEntry(
785788
*config_up, "lzma", LLDB_ENABLE_LZMA,
786789
"A boolean value that indicates if lzma support is enabled in LLDB");

lldb/test/API/terminal/TestEditline.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ def test_left_right_arrow(self):
4747

4848
@skipIfAsan
4949
@skipIfEditlineSupportMissing
50+
@skipIfEditlineWideCharSupportMissing
5051
def test_prompt_unicode(self):
5152
"""Test that we can use Unicode in the LLDB prompt."""
5253
self.launch(use_colors=True, encoding="utf-8")

0 commit comments

Comments
 (0)