()
| 2 | |
| 3 | |
| 4 | def test_cesu8(): |
| 5 | cls1 = bad_codecs.search_function("cesu8").__class__ |
| 6 | cls2 = bad_codecs.search_function("cesu-8").__class__ |
| 7 | assert cls1 == cls2 |
| 8 | |
| 9 | test_bytes = b"\xed\xa6\x9d\xed\xbd\xb7 is an unassigned character, and \xc0\x80 is null" |
| 10 | test_text = "\U00077777 is an unassigned character, and \x00 is null" |
| 11 | assert test_bytes.decode("cesu8") == test_text |
| 12 | |
| 13 | |
| 14 | def test_russian_crash(): |