Whitespace normalization.
[python/dscho.git] / Lib / test / test_codecencodings_tw.py
blob897f060605089c9f6679ed6dcf0e2d477f42d15f
1 #!/usr/bin/env python
3 # test_codecencodings_tw.py
4 # Codec encoding tests for ROC encodings.
6 # $CJKCodecs: test_codecencodings_tw.py,v 1.1 2003/12/19 03:00:06 perky Exp $
8 from test import test_support
9 from test import test_multibytecodec_support
10 import unittest
12 class Test_Big5(test_multibytecodec_support.TestBase, unittest.TestCase):
13 encoding = 'big5'
14 tstring = test_multibytecodec_support.load_teststring('big5')
15 codectests = (
16 # invalid bytes
17 ("abc\x80\x80\xc1\xc4", "strict", None),
18 ("abc\xc8", "strict", None),
19 ("abc\x80\x80\xc1\xc4", "replace", u"abc\ufffd\u8b10"),
20 ("abc\x80\x80\xc1\xc4\xc8", "replace", u"abc\ufffd\u8b10\ufffd"),
21 ("abc\x80\x80\xc1\xc4", "ignore", u"abc\u8b10"),
24 def test_main():
25 suite = unittest.TestSuite()
26 suite.addTest(unittest.makeSuite(Test_Big5))
27 test_support.run_suite(suite)
29 if __name__ == "__main__":
30 test_main()