diff options
Diffstat (limited to 'Lib/test/test_codecencodings_kr.py')
| -rw-r--r-- | Lib/test/test_codecencodings_kr.py | 25 | 
1 files changed, 15 insertions, 10 deletions
diff --git a/Lib/test/test_codecencodings_kr.py b/Lib/test/test_codecencodings_kr.py index de4da7f..4997e83 100644 --- a/Lib/test/test_codecencodings_kr.py +++ b/Lib/test/test_codecencodings_kr.py @@ -15,8 +15,8 @@ class Test_CP949(test_multibytecodec_support.TestBase, unittest.TestCase):          # invalid bytes          (b"abc\x80\x80\xc1\xc4", "strict",  None),          (b"abc\xc8", "strict",  None), -        (b"abc\x80\x80\xc1\xc4", "replace", "abc\ufffd\uc894"), -        (b"abc\x80\x80\xc1\xc4\xc8", "replace", "abc\ufffd\uc894\ufffd"), +        (b"abc\x80\x80\xc1\xc4", "replace", "abc\ufffd\ufffd\uc894"), +        (b"abc\x80\x80\xc1\xc4\xc8", "replace", "abc\ufffd\ufffd\uc894\ufffd"),          (b"abc\x80\x80\xc1\xc4", "ignore",  "abc\uc894"),      ) @@ -27,8 +27,8 @@ class Test_EUCKR(test_multibytecodec_support.TestBase, unittest.TestCase):          # invalid bytes          (b"abc\x80\x80\xc1\xc4", "strict",  None),          (b"abc\xc8", "strict",  None), -        (b"abc\x80\x80\xc1\xc4", "replace", "abc\ufffd\uc894"), -        (b"abc\x80\x80\xc1\xc4\xc8", "replace", "abc\ufffd\uc894\ufffd"), +        (b"abc\x80\x80\xc1\xc4", "replace", 'abc\ufffd\ufffd\uc894'), +        (b"abc\x80\x80\xc1\xc4\xc8", "replace", "abc\ufffd\ufffd\uc894\ufffd"),          (b"abc\x80\x80\xc1\xc4", "ignore",  "abc\uc894"),          # composed make-up sequence errors @@ -40,13 +40,14 @@ class Test_EUCKR(test_multibytecodec_support.TestBase, unittest.TestCase):          (b"\xa4\xd4\xa4\xb6\xa4\xd0\xa4", "strict", None),          (b"\xa4\xd4\xa4\xb6\xa4\xd0\xa4\xd4", "strict", "\uc4d4"),          (b"\xa4\xd4\xa4\xb6\xa4\xd0\xa4\xd4x", "strict", "\uc4d4x"), -        (b"a\xa4\xd4\xa4\xb6\xa4", "replace", "a\ufffd"), +        (b"a\xa4\xd4\xa4\xb6\xa4", "replace", 'a\ufffd'),          (b"\xa4\xd4\xa3\xb6\xa4\xd0\xa4\xd4", "strict", None),          (b"\xa4\xd4\xa4\xb6\xa3\xd0\xa4\xd4", "strict", None),          (b"\xa4\xd4\xa4\xb6\xa4\xd0\xa3\xd4", "strict", None), -        (b"\xa4\xd4\xa4\xff\xa4\xd0\xa4\xd4", "replace", "\ufffd"), -        (b"\xa4\xd4\xa4\xb6\xa4\xff\xa4\xd4", "replace", "\ufffd"), -        (b"\xa4\xd4\xa4\xb6\xa4\xd0\xa4\xff", "replace", "\ufffd"), +        (b"\xa4\xd4\xa4\xff\xa4\xd0\xa4\xd4", "replace", '\ufffd\u6e21\ufffd\u3160\ufffd'), +        (b"\xa4\xd4\xa4\xb6\xa4\xff\xa4\xd4", "replace", '\ufffd\u6e21\ub544\ufffd\ufffd'), +        (b"\xa4\xd4\xa4\xb6\xa4\xd0\xa4\xff", "replace", '\ufffd\u6e21\ub544\u572d\ufffd'), +        (b"\xa4\xd4\xff\xa4\xd4\xa4\xb6\xa4\xd0\xa4\xd4", "replace", '\ufffd\ufffd\ufffd\uc4d4'),          (b"\xc1\xc4", "strict", "\uc894"),      ) @@ -57,9 +58,13 @@ class Test_JOHAB(test_multibytecodec_support.TestBase, unittest.TestCase):          # invalid bytes          (b"abc\x80\x80\xc1\xc4", "strict",  None),          (b"abc\xc8", "strict",  None), -        (b"abc\x80\x80\xc1\xc4", "replace", "abc\ufffd\ucd27"), -        (b"abc\x80\x80\xc1\xc4\xc8", "replace", "abc\ufffd\ucd27\ufffd"), +        (b"abc\x80\x80\xc1\xc4", "replace", "abc\ufffd\ufffd\ucd27"), +        (b"abc\x80\x80\xc1\xc4\xc8", "replace", "abc\ufffd\ufffd\ucd27\ufffd"),          (b"abc\x80\x80\xc1\xc4", "ignore",  "abc\ucd27"), +        (b"\xD8abc", "replace",  "\uFFFDabc"), +        (b"\xD8\xFFabc", "replace",  "\uFFFD\uFFFDabc"), +        (b"\x84bxy", "replace",  "\uFFFDbxy"), +        (b"\x8CBxy", "replace",  "\uFFFDBxy"),      )  def test_main():  | 
