[Lldb-commits] [lldb] r258969 - Resubmit r258759 with proper unicode handling.
Zachary Turner via lldb-commits
lldb-commits at lists.llvm.org
Wed Jan 27 11:00:52 PST 2016
Author: zturner
Date: Wed Jan 27 13:00:51 2016
New Revision: 258969
URL: http://llvm.org/viewvc/llvm-project?rev=258969&view=rev
Log:
Resubmit r258759 with proper unicode handling.
Instead of opening the file in unicode mode, we need only encode
data which potentially has non-ASCII characters as UTF8 before
writing. This should work across both Python versions, and is
also far simpler than anything else discussed.
Modified:
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/char1632_t/TestChar1632T.py
lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/char1632_t/TestChar1632T.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/char1632_t/TestChar1632T.py?rev=258969&r1=258968&r2=258969&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/char1632_t/TestChar1632T.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/char1632_t/TestChar1632T.py Wed Jan 27 13:00:51 2016
@@ -25,7 +25,6 @@ class Char1632TestCase(TestBase):
line_number(self.source, '// breakpoint2') ]
@expectedFailureIcc # ICC (13.1) does not emit the DW_TAG_base_type for char16_t and char32_t.
- @expectedFailureWindows("llvm.org/pr24489: Name lookup not working correctly on Windows")
def test(self):
"""Test that the C++11 support for char16_t and char32_t works correctly."""
self.build()
Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py?rev=258969&r1=258968&r2=258969&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py Wed Jan 27 13:00:51 2016
@@ -262,7 +262,7 @@ class recording(SixStringIO):
if self.trace:
print(self.getvalue(), file=sys.stderr)
if self.session:
- print(self.getvalue(), file=self.session)
+ print(self.getvalue().encode(), file=self.session)
self.close()
@add_metaclass(abc.ABCMeta)
@@ -1843,7 +1843,7 @@ class Base(unittest2.TestCase):
if not self.__unexpected__ and not self.__skipped__:
for test, traceback in pairs:
if test is self:
- print(traceback, file=self.session)
+ print(traceback.encode(), file=self.session)
# put footer (timestamp/rerun instructions) into session
testMethod = getattr(self, self._testMethodName)
More information about the lldb-commits
mailing list