blob: bb1d133cad1be5f0a4db1ed9c41803292fc8eeba [file] [log] [blame]
Hye-Shik Chang3e2a3062004-01-17 14:29:29 +00001#
2# test_codecencodings_tw.py
3# Codec encoding tests for ROC encodings.
4#
Hye-Shik Chang3e2a3062004-01-17 14:29:29 +00005
R David Murray75d9aca2012-04-09 09:37:52 -04006from test import multibytecodec_support
Hye-Shik Chang3e2a3062004-01-17 14:29:29 +00007import unittest
8
R David Murray75d9aca2012-04-09 09:37:52 -04009class Test_Big5(multibytecodec_support.TestBase, unittest.TestCase):
Hye-Shik Chang3e2a3062004-01-17 14:29:29 +000010 encoding = 'big5'
R David Murray75d9aca2012-04-09 09:37:52 -040011 tstring = multibytecodec_support.load_teststring('big5')
Hye-Shik Chang3e2a3062004-01-17 14:29:29 +000012 codectests = (
13 # invalid bytes
Guido van Rossum024da5c2007-05-17 23:59:11 +000014 (b"abc\x80\x80\xc1\xc4", "strict", None),
15 (b"abc\xc8", "strict", None),
Victor Stinner2cded9c2011-07-08 01:45:13 +020016 (b"abc\x80\x80\xc1\xc4", "replace", "abc\ufffd\ufffd\u8b10"),
17 (b"abc\x80\x80\xc1\xc4\xc8", "replace", "abc\ufffd\ufffd\u8b10\ufffd"),
Guido van Rossum024da5c2007-05-17 23:59:11 +000018 (b"abc\x80\x80\xc1\xc4", "ignore", "abc\u8b10"),
Hye-Shik Chang3e2a3062004-01-17 14:29:29 +000019 )
20
Hye-Shik Chang3e2a3062004-01-17 14:29:29 +000021if __name__ == "__main__":
Zachary Ware38c707e2015-04-13 15:00:43 -050022 unittest.main()