Skip to content

Commit 006b86d

Browse files
authored
Merge pull request #443 from Teemperor/UnicodeInput
[lldb] Actually enable wchar support in Editline when it is defined i…
2 parents 3850e3e + bd528c7 commit 006b86d

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

lldb/include/lldb/Host/Editline.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
#define liblldb_Editline_h_
3333
#if defined(__cplusplus)
3434

35+
#include "lldb/Host/Config.h"
36+
3537
#if LLDB_EDITLINE_USE_WCHAR
3638
#include <codecvt>
3739
#endif
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# -*- coding: utf-8 -*-
2+
"""
3+
Test unicode handling in LLDB.
4+
"""
5+
6+
import os
7+
8+
import lldb
9+
from lldbsuite.test.decorators import *
10+
from lldbsuite.test.lldbtest import *
11+
from lldbsuite.test.lldbpexpect import PExpectTest
12+
13+
class TestCase(PExpectTest):
14+
15+
mydir = TestBase.compute_mydir(__file__)
16+
17+
# PExpect uses many timeouts internally and doesn't play well
18+
# under ASAN on a loaded machine..
19+
@skipIfAsan
20+
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(u'\u1234', substrs=[u"error: '\u1234' is not a valid command.".encode('utf-8')])
26+
27+
self.quit()

0 commit comments

Comments
 (0)