Skip to content

Commit 111bc6f

Browse files
authored
[lldb] Add config and decorator for wide character support in Editline (#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.
1 parent 7c229f6 commit 111bc6f

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
@@ -1027,6 +1027,10 @@ def skipIfEditlineSupportMissing(func):
10271027
return _get_bool_config_skip_if_decorator("editline")(func)
10281028

10291029

1030+
def skipIfEditlineWideCharSupportMissing(func):
1031+
return _get_bool_config_skip_if_decorator("editline_wchar")(func)
1032+
1033+
10301034
def skipIfFBSDVMCoreSupportMissing(func):
10311035
return _get_bool_config_skip_if_decorator("fbsdvmcore")(func)
10321036

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)