diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/fs.py | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -435,6 +435,13 @@ def run_file(binary): assert run(client, term, b'fi\n') == b'error not run\n' # a syntax error runs nothing assert run(client, term, b"echo 'open\n") == b'error not run\n' # nor does an open quote assert run(client, term, b'true\n') == b'exit 0\n' # ...and the shell is clear after + # A pty asked for one row gets two: one loses the prompt's input + # mark, and the shell would read busy for ever. + client.write(f'/pane/{term}/pty/ctl', b'winsize 20 1\n') + time.sleep(.5) + assert run(client, term, b'true\n') == b'exit 0\n' + assert client.read(f'/pane/{term}/pty/ctl').split()[2] == b'2', client.read(f'/pane/{term}/pty/ctl') + client.write(f'/pane/{term}/pty/ctl', b'winsize 80 24\n') with Client(address) as other: slow = [] waiter = threading.Thread(target=lambda: slow.append(run(other, term, b'sleep 1\n')), daemon=True) |
