Hye-Shik Chang | 3e2a306 | 2004-01-17 14:29:29 +0000 | [diff] [blame] | 1 | #!/usr/bin/env python |
| 2 | # |
| 3 | # test_codecmaps_tw.py |
| 4 | # Codec mapping tests for ROC encodings |
| 5 | # |
Hye-Shik Chang | 3e2a306 | 2004-01-17 14:29:29 +0000 | [diff] [blame] | 6 | |
Benjamin Peterson | ee8712c | 2008-05-20 21:35:26 +0000 | [diff] [blame] | 7 | from test import support |
Hye-Shik Chang | 3e2a306 | 2004-01-17 14:29:29 +0000 | [diff] [blame] | 8 | from test import test_multibytecodec_support |
| 9 | import unittest |
| 10 | |
| 11 | class TestBIG5Map(test_multibytecodec_support.TestBase_Mapping, |
| 12 | unittest.TestCase): |
| 13 | encoding = 'big5' |
Hye-Shik Chang | 3e2a306 | 2004-01-17 14:29:29 +0000 | [diff] [blame] | 14 | mapfileurl = 'http://www.unicode.org/Public/MAPPINGS/OBSOLETE/' \ |
| 15 | 'EASTASIA/OTHER/BIG5.TXT' |
| 16 | |
| 17 | class TestCP950Map(test_multibytecodec_support.TestBase_Mapping, |
| 18 | unittest.TestCase): |
| 19 | encoding = 'cp950' |
Hye-Shik Chang | 3e2a306 | 2004-01-17 14:29:29 +0000 | [diff] [blame] | 20 | mapfileurl = 'http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/' \ |
| 21 | 'WINDOWS/CP950.TXT' |
| 22 | pass_enctest = [ |
Guido van Rossum | 005ebb1 | 2007-07-23 18:06:59 +0000 | [diff] [blame] | 23 | (b'\xa2\xcc', '\u5341'), |
| 24 | (b'\xa2\xce', '\u5345'), |
Hye-Shik Chang | 3e2a306 | 2004-01-17 14:29:29 +0000 | [diff] [blame] | 25 | ] |
| 26 | |
| 27 | def test_main(): |
Benjamin Peterson | ee8712c | 2008-05-20 21:35:26 +0000 | [diff] [blame] | 28 | support.run_unittest(__name__) |
Hye-Shik Chang | 3e2a306 | 2004-01-17 14:29:29 +0000 | [diff] [blame] | 29 | |
Hye-Shik Chang | 3e2a306 | 2004-01-17 14:29:29 +0000 | [diff] [blame] | 30 | if __name__ == "__main__": |
| 31 | test_main() |