diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-30 13:52:14 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:17 -0300 |
| commit | a33fc226c32d97a053bafdb13d6ec3bf8b537f35 (patch) | |
| tree | 21e2df58d94bebe3effde8cb447ae7f64e9c5b9a /test | |
| parent | 0fb5881520884691c395ef1ce4b9d1d902434bd6 (diff) | |
| download | pardes-a33fc226c32d97a053bafdb13d6ec3bf8b537f35.tar.gz pardes-a33fc226c32d97a053bafdb13d6ec3bf8b537f35.zip | |
winsize refuses fewer than 2 rows, saying so, and its range reads 1x2 to 4096x4096 as the docs say
`winsize 20 1` was taken and quietly raised to 2 rows, so the write
succeeded with a size other than the one asked for. The range refusal
also said "1x1 to 4096x4096", although fs.md says at least 2 rows. One row
is now refused with "invalid winsize: at least 2 rows", and the range
text starts at 1x2. size already refused anything under 20x6 with a text
that names it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'test')
| -rw-r--r-- | test/fs.py | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -436,9 +436,14 @@ 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') + # A pty is not given one row (it loses the prompt's input mark, + # and the shell would read busy for ever): refused, and said. + try: + client.write(f'/pane/{term}/pty/ctl', b'winsize 20 1\n') + raise AssertionError('winsize 20 1 was taken') + except OSError as refused: + assert 'at least 2 rows' in str(refused), refused + client.write(f'/pane/{term}/pty/ctl', b'winsize 20 2\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') |
