summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2003-05-18 12:31:09 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2003-05-18 12:31:09 (GMT)
commit9a3a9f779142d92655f86eaf9584ce946c61dfea (patch)
tree33fbbd0f1e899b20d9b909844c55f6ffc64f6187 /Lib
parent9e46abed5061729915ed39d7bb8c4d014369380e (diff)
downloadcpython-9a3a9f779142d92655f86eaf9584ce946c61dfea.zip
cpython-9a3a9f779142d92655f86eaf9584ce946c61dfea.tar.gz
cpython-9a3a9f779142d92655f86eaf9584ce946c61dfea.tar.bz2
Consider \U-escapes in raw-unicode-escape. Fixes #444514.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_unicode.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py
index 9250ef2..8e1f0b1 100644
--- a/Lib/test/test_unicode.py
+++ b/Lib/test/test_unicode.py
@@ -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)