mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Consider \U-escapes in raw-unicode-escape. Fixes #444514.
This commit is contained in:
parent
9e46abed50
commit
9a3a9f7791
2 changed files with 49 additions and 3 deletions
|
@ -697,6 +697,13 @@ class UnicodeTest(
|
|||
print >>out, u'def\n'
|
||||
print >>out, u'def\n'
|
||||
|
||||
def test_ucs4(self):
|
||||
if sys.maxunicode == 0xFFFF:
|
||||
return
|
||||
x = u'\U00100000'
|
||||
y = x.encode("raw-unicode-escape").decode("raw-unicode-escape")
|
||||
self.assertEqual(x, y)
|
||||
|
||||
def test_main():
|
||||
test_support.run_unittest(UnicodeTest)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue