test for broken encoding
Markus Gerstel
5 years ago
13 | 13 | assert result['exitcode'] == 0 |
14 | 14 | assert result['stdout'] == b'hello' + os.linesep.encode('utf-8') |
15 | 15 | assert result['stderr'] == b'' |
16 | ||
17 | def test_input_encoding(): | |
18 | command = ['python', '-c', 'import sys; sys.stdout.write("".join(chr(x) for x in ' | |
19 | '(0x74,0x65,0x73,0x74,0xa0,0x50,0x73,0x74,0x72,0x69,0x6e,0x67,0x0a)' | |
20 | '))'] | |
21 | result = procrunner.run(command) | |
22 | ||
23 | assert result['exitcode'] == 0 |