This revision was automatically updated to reflect the committed changes.
Closed by commit rG14f3d13412cb: [lldb] Actually enable wchar support in 
Editline when it is defined in the host… (authored by teemperor).

Changed prior to commit:
  https://reviews.llvm.org/D71251?vs=233042&id=233067#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71251/new/

https://reviews.llvm.org/D71251

Files:
  lldb/include/lldb/Host/Editline.h
  lldb/packages/Python/lldbsuite/test/iohandler/unicode/TestUnicode.py


Index: lldb/packages/Python/lldbsuite/test/iohandler/unicode/TestUnicode.py
===================================================================
--- /dev/null
+++ lldb/packages/Python/lldbsuite/test/iohandler/unicode/TestUnicode.py
@@ -0,0 +1,27 @@
+# -*- 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):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    # PExpect uses many timeouts internally and doesn't play well
+    # under ASAN on a loaded machine..
+    @skipIfAsan
+    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(u'\u1234', substrs=[u"error: '\u1234' is not a valid 
command.".encode('utf-8')])
+
+        self.quit()
Index: lldb/include/lldb/Host/Editline.h
===================================================================
--- lldb/include/lldb/Host/Editline.h
+++ lldb/include/lldb/Host/Editline.h
@@ -32,6 +32,8 @@
 #define liblldb_Editline_h_
 #if defined(__cplusplus)
 
+#include "lldb/Host/Config.h"
+
 #if LLDB_EDITLINE_USE_WCHAR
 #include <codecvt>
 #endif


Index: lldb/packages/Python/lldbsuite/test/iohandler/unicode/TestUnicode.py
===================================================================
--- /dev/null
+++ lldb/packages/Python/lldbsuite/test/iohandler/unicode/TestUnicode.py
@@ -0,0 +1,27 @@
+# -*- 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):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    # PExpect uses many timeouts internally and doesn't play well
+    # under ASAN on a loaded machine..
+    @skipIfAsan
+    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(u'\u1234', substrs=[u"error: '\u1234' is not a valid command.".encode('utf-8')])
+
+        self.quit()
Index: lldb/include/lldb/Host/Editline.h
===================================================================
--- lldb/include/lldb/Host/Editline.h
+++ lldb/include/lldb/Host/Editline.h
@@ -32,6 +32,8 @@
 #define liblldb_Editline_h_
 #if defined(__cplusplus)
 
+#include "lldb/Host/Config.h"
+
 #if LLDB_EDITLINE_USE_WCHAR
 #include <codecvt>
 #endif
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to