2004-01-17 10:29:29 -04:00
|
|
|
#
|
|
|
|
# test_codecmaps_tw.py
|
|
|
|
# Codec mapping tests for ROC encodings
|
|
|
|
#
|
|
|
|
|
|
|
|
from test import test_support
|
|
|
|
from test import test_multibytecodec_support
|
|
|
|
import unittest
|
|
|
|
|
|
|
|
class TestBIG5Map(test_multibytecodec_support.TestBase_Mapping,
|
|
|
|
unittest.TestCase):
|
|
|
|
encoding = 'big5'
|
2014-11-06 09:37:49 -04:00
|
|
|
mapfileurl = 'http://www.pythontest.net/unicode/BIG5.TXT'
|
2004-01-17 10:29:29 -04:00
|
|
|
|
|
|
|
class TestCP950Map(test_multibytecodec_support.TestBase_Mapping,
|
|
|
|
unittest.TestCase):
|
|
|
|
encoding = 'cp950'
|
2014-11-06 09:37:49 -04:00
|
|
|
mapfileurl = 'http://www.pythontest.net/unicode/CP950.TXT'
|
2004-01-17 10:29:29 -04:00
|
|
|
pass_enctest = [
|
|
|
|
('\xa2\xcc', u'\u5341'),
|
|
|
|
('\xa2\xce', u'\u5345'),
|
|
|
|
]
|
|
|
|
|
|
|
|
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()
|