source: python/trunk/Lib/test/test_codecencodings_tw.py

Last change on this file was 2, checked in by Yuri Dario, 15 years ago

Initial import for vendor code.

  • Property svn:eol-style set to native
File size: 788 bytes
Line 
1#!/usr/bin/env python
2#
3# test_codecencodings_tw.py
4# Codec encoding tests for ROC encodings.
5#
6
7from test import test_support
8from test import test_multibytecodec_support
9import unittest
10
11class Test_Big5(test_multibytecodec_support.TestBase, unittest.TestCase):
12 encoding = 'big5'
13 tstring = test_multibytecodec_support.load_teststring('big5')
14 codectests = (
15 # invalid bytes
16 ("abc\x80\x80\xc1\xc4", "strict", None),
17 ("abc\xc8", "strict", None),
18 ("abc\x80\x80\xc1\xc4", "replace", u"abc\ufffd\u8b10"),
19 ("abc\x80\x80\xc1\xc4\xc8", "replace", u"abc\ufffd\u8b10\ufffd"),
20 ("abc\x80\x80\xc1\xc4", "ignore", u"abc\u8b10"),
21 )
22
23def test_main():
24 test_support.run_unittest(__name__)
25
26if __name__ == "__main__":
27 test_main()
Note: See TracBrowser for help on using the repository browser.