summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorHye-Shik Chang <hyeshik@gmail.com>2006-03-13 10:20:08 (GMT)
committerHye-Shik Chang <hyeshik@gmail.com>2006-03-13 10:20:08 (GMT)
commitabb903fd54596cba08129a110bc53d9ca21935a9 (patch)
treed4151791caf16e6377c6b03c6ba9f3b9ac4304b0 /Lib
parent6058aa40d288d8cdd93dddfe9c660450f598b3ae (diff)
downloadcpython-abb903fd54596cba08129a110bc53d9ca21935a9.zip
cpython-abb903fd54596cba08129a110bc53d9ca21935a9.tar.gz
cpython-abb903fd54596cba08129a110bc53d9ca21935a9.tar.bz2
Bug #1448490: Fix a bug that ISO-2022 codecs could not handle
SS2 (single-shift 2) escape sequences correctly.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_multibytecodec.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_multibytecodec.py b/Lib/test/test_multibytecodec.py
index acf333e..aef7931 100644
--- a/Lib/test/test_multibytecodec.py
+++ b/Lib/test/test_multibytecodec.py
@@ -75,9 +75,16 @@ class Test_StreamWriter(unittest.TestCase):
wr.write('abcd')
self.assertEqual(s.getvalue(), 'abcd')
+class Test_ISO2022(unittest.TestCase):
+ def test_g2(self):
+ iso2022jp2 = '\x1b(B:hu4:unit\x1b.A\x1bNi de famille'
+ uni = u':hu4:unit\xe9 de famille'
+ self.assertEqual(iso2022jp2.decode('iso2022-jp-2'), uni)
+
def test_main():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(Test_StreamWriter))
+ suite.addTest(unittest.makeSuite(Test_ISO2022))
test_support.run_suite(suite)
if __name__ == "__main__":