summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_multibytecodec.py
diff options
context:
space:
mode:
authorHye-Shik Chang <hyeshik@gmail.com>2004-07-18 03:06:29 (GMT)
committerHye-Shik Chang <hyeshik@gmail.com>2004-07-18 03:06:29 (GMT)
commit2bb146f2f4fd52b03cfa7ae739adb35d2b9f5421 (patch)
treeebd4c873cfc841dc978053941b2859d4efbd9082 /Lib/test/test_multibytecodec.py
parent264c659197bcd2fc3e22776fc711f31b953daae5 (diff)
downloadcpython-2bb146f2f4fd52b03cfa7ae739adb35d2b9f5421.zip
cpython-2bb146f2f4fd52b03cfa7ae739adb35d2b9f5421.tar.gz
cpython-2bb146f2f4fd52b03cfa7ae739adb35d2b9f5421.tar.bz2
Bring CJKCodecs 1.1 into trunk. This completely reorganizes source
and installed layouts to make maintenance simple and easy. And it also adds four new codecs; big5hkscs, euc-jis-2004, shift-jis-2004 and iso2022-jp-2004.
Diffstat (limited to 'Lib/test/test_multibytecodec.py')
-rw-r--r--Lib/test/test_multibytecodec.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/Lib/test/test_multibytecodec.py b/Lib/test/test_multibytecodec.py
index e96afba..acf333e 100644
--- a/Lib/test/test_multibytecodec.py
+++ b/Lib/test/test_multibytecodec.py
@@ -3,7 +3,7 @@
# test_multibytecodec.py
# Unit test for multibytecodec itself
#
-# $CJKCodecs: test_multibytecodec.py,v 1.5 2004/01/06 02:26:28 perky Exp $
+# $CJKCodecs: test_multibytecodec.py,v 1.8 2004/06/19 06:09:55 perky Exp $
from test import test_support
from test import test_multibytecodec_support
@@ -69,6 +69,12 @@ class Test_StreamWriter(unittest.TestCase):
def test_str_decode(self):
self.assertEqual('abcd'.encode('gb18030'), 'abcd')
+ def test_streamwriter_strwrite(self):
+ s = StringIO.StringIO()
+ wr = codecs.getwriter('gb18030')(s)
+ wr.write('abcd')
+ self.assertEqual(s.getvalue(), 'abcd')
+
def test_main():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(Test_StreamWriter))