Hye-Shik Chang | 3e2a306 | 2004-01-17 14:29:29 +0000 | [diff] [blame] | 1 | #!/usr/bin/env python |
| 2 | # |
| 3 | # test_codecmaps_cn.py |
| 4 | # Codec mapping tests for PRC encodings |
| 5 | # |
Hye-Shik Chang | 3e2a306 | 2004-01-17 14:29:29 +0000 | [diff] [blame] | 6 | |
| 7 | from test import test_support |
| 8 | from test import test_multibytecodec_support |
| 9 | import unittest |
| 10 | |
| 11 | class TestGB2312Map(test_multibytecodec_support.TestBase_Mapping, |
| 12 | unittest.TestCase): |
| 13 | encoding = 'gb2312' |
Hye-Shik Chang | 3e2a306 | 2004-01-17 14:29:29 +0000 | [diff] [blame] | 14 | mapfileurl = 'http://people.freebsd.org/~perky/i18n/EUC-CN.TXT' |
| 15 | |
| 16 | class TestGBKMap(test_multibytecodec_support.TestBase_Mapping, |
| 17 | unittest.TestCase): |
| 18 | encoding = 'gbk' |
Hye-Shik Chang | 3e2a306 | 2004-01-17 14:29:29 +0000 | [diff] [blame] | 19 | mapfileurl = 'http://www.unicode.org/Public/MAPPINGS/VENDORS/' \ |
| 20 | 'MICSFT/WINDOWS/CP936.TXT' |
| 21 | |
| 22 | def test_main(): |
| 23 | suite = unittest.TestSuite() |
| 24 | suite.addTest(unittest.makeSuite(TestGB2312Map)) |
| 25 | suite.addTest(unittest.makeSuite(TestGBKMap)) |
| 26 | test_support.run_suite(suite) |
| 27 | |
Hye-Shik Chang | 3e2a306 | 2004-01-17 14:29:29 +0000 | [diff] [blame] | 28 | if __name__ == "__main__": |
| 29 | test_main() |