home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2011 June / maximum-cd-2011-06.iso / DiscContents / LibO_3.3.1_Win_x86_install_multi.exe / libreoffice1.cab / test_codecmaps_tw.py < prev    next >
Encoding:
Python Source  |  2011-02-15  |  857 b   |  32 lines

  1. #!/usr/bin/env python
  2. #
  3. # test_codecmaps_tw.py
  4. #   Codec mapping tests for ROC encodings
  5. #
  6.  
  7. from test import test_support
  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'
  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'
  20.     mapfileurl = 'http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/' \
  21.                  'WINDOWS/CP950.TXT'
  22.     pass_enctest = [
  23.         ('\xa2\xcc', u'\u5341'),
  24.         ('\xa2\xce', u'\u5345'),
  25.     ]
  26.  
  27. def test_main():
  28.     test_support.run_unittest(__name__)
  29.  
  30. if __name__ == "__main__":
  31.     test_main()
  32.