move sections
[python/dscho.git] / Lib / test / test_codecmaps_kr.py
blob39c612e8a22452d0290ab6028361b3790ff8560e
1 #!/usr/bin/env python
3 # test_codecmaps_kr.py
4 # Codec mapping tests for ROK encodings
7 from test import test_support
8 from test import test_multibytecodec_support
9 import unittest
11 class TestCP949Map(test_multibytecodec_support.TestBase_Mapping,
12 unittest.TestCase):
13 encoding = 'cp949'
14 mapfileurl = 'http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT' \
15 '/WINDOWS/CP949.TXT'
18 class TestEUCKRMap(test_multibytecodec_support.TestBase_Mapping,
19 unittest.TestCase):
20 encoding = 'euc_kr'
21 mapfileurl = 'http://people.freebsd.org/~perky/i18n/EUC-KR.TXT'
23 # A4D4 HANGUL FILLER indicates the begin of 8-bytes make-up sequence.
24 pass_enctest = [('\xa4\xd4', u'\u3164')]
25 pass_dectest = [('\xa4\xd4', u'\u3164')]
28 class TestJOHABMap(test_multibytecodec_support.TestBase_Mapping,
29 unittest.TestCase):
30 encoding = 'johab'
31 mapfileurl = 'http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/' \
32 'KSC/JOHAB.TXT'
33 # KS X 1001 standard assigned 0x5c as WON SIGN.
34 # but, in early 90s that is the only era used johab widely,
35 # the most softwares implements it as REVERSE SOLIDUS.
36 # So, we ignore the standard here.
37 pass_enctest = [('\\', u'\u20a9')]
38 pass_dectest = [('\\', u'\u20a9')]
40 def test_main():
41 test_support.run_unittest(__name__)
43 if __name__ == "__main__":
44 test_main()