Consider \U-escapes in raw-unicode-escape. Fixes #444514.

This commit is contained in:
Martin v. Löwis 2003-05-18 12:31:09 +00:00
parent 9e46abed50
commit 9a3a9f7791
2 changed files with 49 additions and 3 deletions

View file

@ -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)