2004-01-17 10:29:29 -04:00
|
|
|
#
|
|
|
|
# test_codecmaps_cn.py
|
|
|
|
# Codec mapping tests for PRC encodings
|
|
|
|
#
|
|
|
|
|
|
|
|
from test import test_support
|
|
|
|
from test import test_multibytecodec_support
|
|
|
|
import unittest
|
|
|
|
|
|
|
|
class TestGB2312Map(test_multibytecodec_support.TestBase_Mapping,
|
|
|
|
unittest.TestCase):
|
|
|
|
encoding = 'gb2312'
|
2014-11-06 09:37:49 -04:00
|
|
|
mapfileurl = 'http://www.pythontest.net/unicode/EUC-CN.TXT'
|
2004-01-17 10:29:29 -04:00
|
|
|
|
|
|
|
class TestGBKMap(test_multibytecodec_support.TestBase_Mapping,
|
|
|
|
unittest.TestCase):
|
|
|
|
encoding = 'gbk'
|
2014-11-06 09:37:49 -04:00
|
|
|
mapfileurl = 'http://www.pythontest.net/unicode/CP936.TXT'
|
2004-01-17 10:29:29 -04:00
|
|
|
|
2007-08-04 01:10:18 -03:00
|
|
|
class TestGB18030Map(test_multibytecodec_support.TestBase_Mapping,
|
|
|
|
unittest.TestCase):
|
|
|
|
encoding = 'gb18030'
|
2014-11-06 09:37:49 -04:00
|
|
|
mapfileurl = 'http://www.pythontest.net/unicode/gb-18030-2000.xml'
|
2007-08-04 01:10:18 -03:00
|
|
|
|
|
|
|
|
2004-01-17 10:29:29 -04:00
|
|
|
def test_main():
|
2007-04-25 14:29:52 -03:00
|
|
|
test_support.run_unittest(__name__)
|
2004-01-17 10:29:29 -04:00
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
test_main()
|