Files
Pierre-Marie de Rodat f7749fcc6b Testsuite: use "ascii" for non-ASCII test outputs
On Windows, the default encoding (not UTF-8) may not allow non-ASCII
test outputs. Use Python's "ascii" builtin where needed to ensure pure
ASCII test outputs.

TN: U720-016
2021-09-27 14:46:45 +02:00

32 lines
1.7 KiB
Plaintext

main.py: Running...
== get_from_buffer ==
buffer='example # H\xe9llo', charset=None: 'example # H\xe9llo'
buffer='example # H\xeallo', charset='': 'example # H\xeallo'
buffer='example # H\xebllo', charset='utf-8': TypeError: `charset` must be null when the buffer is Unicode
buffer=b'example # H\xe9llo', charset=None: 'example # H\xe9llo'
buffer=b'example # H\xeallo', charset='': 'example # H\xeallo'
buffer=b'example # H\xebllo', charset='iso-8859-1': 'example # H\xebllo'
buffer=b'example # H\xecllo', charset='utf-8': diagnostics:
Could not decode source as "utf-8"
buffer=b'example # H\xecllo', charset='unknown-charset': diagnostics:
Unknown charset "unknown-charset"
buffer=b'example # H\xc3\xa9llo', charset='utf-8': 'example # H\xe9llo'
buffer=b'example # H\xc3\xa9llo', charset=None: 'example # H\xc3\xa9llo'
== reparse ==
buffer='example # H\xe9llo', charset=None: 'example # H\xe9llo'
buffer='example # H\xeallo', charset='': 'example # H\xeallo'
buffer='example # H\xebllo', charset='utf-8': TypeError: `charset` must be null when the buffer is Unicode
buffer=b'example # H\xe9llo', charset=None: 'example # H\xe9llo'
buffer=b'example # H\xeallo', charset='': 'example # H\xeallo'
buffer=b'example # H\xebllo', charset='iso-8859-1': 'example # H\xebllo'
buffer=b'example # H\xecllo', charset='utf-8': diagnostics:
Could not decode source as "utf-8"
buffer=b'example # H\xecllo', charset='unknown-charset': diagnostics:
Unknown charset "unknown-charset"
buffer=b'example # H\xc3\xa9llo', charset='utf-8': 'example # H\xe9llo'
buffer=b'example # H\xc3\xa9llo', charset=None: 'example # H\xc3\xa9llo'
main.py: Done.
Done