Hye-Shik Chang | 3e2a306 | 2004-01-17 14:29:29 +0000 | [diff] [blame] | 1 | # |
| 2 | # test_codecmaps_kr.py |
| 3 | # Codec mapping tests for ROK encodings |
| 4 | # |
Hye-Shik Chang | 3e2a306 | 2004-01-17 14:29:29 +0000 | [diff] [blame] | 5 | |
Benjamin Peterson | ee8712c | 2008-05-20 21:35:26 +0000 | [diff] [blame] | 6 | from test import support |
R David Murray | 75d9aca | 2012-04-09 09:37:52 -0400 | [diff] [blame] | 7 | from test import multibytecodec_support |
Hye-Shik Chang | 3e2a306 | 2004-01-17 14:29:29 +0000 | [diff] [blame] | 8 | import unittest |
| 9 | |
R David Murray | 75d9aca | 2012-04-09 09:37:52 -0400 | [diff] [blame] | 10 | class TestCP949Map(multibytecodec_support.TestBase_Mapping, |
Hye-Shik Chang | 3e2a306 | 2004-01-17 14:29:29 +0000 | [diff] [blame] | 11 | unittest.TestCase): |
| 12 | encoding = 'cp949' |
Georg Brandl | 5a15508 | 2014-11-06 14:37:49 +0100 | [diff] [blame] | 13 | mapfileurl = 'http://www.pythontest.net/unicode/CP949.TXT' |
Hye-Shik Chang | 3e2a306 | 2004-01-17 14:29:29 +0000 | [diff] [blame] | 14 | |
| 15 | |
R David Murray | 75d9aca | 2012-04-09 09:37:52 -0400 | [diff] [blame] | 16 | class TestEUCKRMap(multibytecodec_support.TestBase_Mapping, |
Hye-Shik Chang | 3e2a306 | 2004-01-17 14:29:29 +0000 | [diff] [blame] | 17 | unittest.TestCase): |
| 18 | encoding = 'euc_kr' |
Georg Brandl | 5a15508 | 2014-11-06 14:37:49 +0100 | [diff] [blame] | 19 | mapfileurl = 'http://www.pythontest.net/unicode/EUC-KR.TXT' |
Hye-Shik Chang | 3e2a306 | 2004-01-17 14:29:29 +0000 | [diff] [blame] | 20 | |
Guido van Rossum | 61e21b5 | 2007-08-20 19:06:03 +0000 | [diff] [blame] | 21 | # A4D4 HANGUL FILLER indicates the begin of 8-bytes make-up sequence. |
| 22 | pass_enctest = [(b'\xa4\xd4', '\u3164')] |
| 23 | pass_dectest = [(b'\xa4\xd4', '\u3164')] |
| 24 | |
Hye-Shik Chang | 3e2a306 | 2004-01-17 14:29:29 +0000 | [diff] [blame] | 25 | |
R David Murray | 75d9aca | 2012-04-09 09:37:52 -0400 | [diff] [blame] | 26 | class TestJOHABMap(multibytecodec_support.TestBase_Mapping, |
Hye-Shik Chang | 3e2a306 | 2004-01-17 14:29:29 +0000 | [diff] [blame] | 27 | unittest.TestCase): |
| 28 | encoding = 'johab' |
Georg Brandl | 5a15508 | 2014-11-06 14:37:49 +0100 | [diff] [blame] | 29 | mapfileurl = 'http://www.pythontest.net/unicode/JOHAB.TXT' |
Hye-Shik Chang | 3e2a306 | 2004-01-17 14:29:29 +0000 | [diff] [blame] | 30 | # KS X 1001 standard assigned 0x5c as WON SIGN. |
| 31 | # but, in early 90s that is the only era used johab widely, |
| 32 | # the most softwares implements it as REVERSE SOLIDUS. |
| 33 | # So, we ignore the standard here. |
Guido van Rossum | 005ebb1 | 2007-07-23 18:06:59 +0000 | [diff] [blame] | 34 | pass_enctest = [(b'\\', '\u20a9')] |
| 35 | pass_dectest = [(b'\\', '\u20a9')] |
Hye-Shik Chang | 3e2a306 | 2004-01-17 14:29:29 +0000 | [diff] [blame] | 36 | |
Hye-Shik Chang | 3e2a306 | 2004-01-17 14:29:29 +0000 | [diff] [blame] | 37 | if __name__ == "__main__": |
Zachary Ware | d9de794 | 2014-07-01 19:55:04 -0500 | [diff] [blame] | 38 | unittest.main() |