Debian Codegraph @

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

raw
1 from __future__ import annotations
2
3 import sys
4
5 prompts = sys.argv[1:] or ['foo']
6
7 # UTF8 encoded bytes
8 # to ensure pexpect doesn't have any encoding errors
9 data = 'line one 汉语\nline two\nline three\nline four\n'.encode()
10
11 sys.stdout.buffer.write(data)
12 print()
13
14 for prompt in prompts:
15 user_input = input(prompt)
16 print(user_input)