Debian Codegraph @

test/integration/targets/expect/files/test_non_utf8_command.py

raw
1 from __future__ import annotations
2
3 import sys
4
5 prompts = sys.argv[1:] or ['foo']
6
7 # latin1 encoded bytes
8 # to ensure pexpect doesn't have any encoding errors
9 data = b'premi\xe8re is first\npremie?re is slightly different\n????????? is Cyrillic\n? am Deseret\n'
10
11 sys.stdout.buffer.write(data)
12 print()
13
14 for prompt in prompts:
15 user_input = input(prompt)
16 print(user_input)