summaryrefslogtreecommitdiff
path: root/test/fs.py
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-29 06:16:52 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:16 -0300
commitc78641fdbe931ca2e6e87eb3e001bd021c1eba3f (patch)
tree340b3c2a74c88777c3078533709efaad0e25a198 /test/fs.py
parent4dc55f7e3ae8232e6994b92e6b1948bd8c190baf (diff)
downloadpardes-c78641fdbe931ca2e6e87eb3e001bd021c1eba3f.tar.gz
pardes-c78641fdbe931ca2e6e87eb3e001bd021c1eba3f.zip
A pty/ctl winsize gives a terminal two rows at least, so it no longer reads busy for ever
A one-row pty loses the prompt's input mark as soon as the prompt wraps, and busy detection never sees the shell idle again. Placement already keeps a new terminal at tag + 2 rows; a winsize write now keeps the pty at two. A pane dragged down to one body row keeps a one-row pty, since a taller pty than the pane shows would put its cursor below the pane. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'test/fs.py')
-rw-r--r--test/fs.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/fs.py b/test/fs.py
index 8d16d718..45fdbc38 100644
--- a/test/fs.py
+++ b/test/fs.py
@@ -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)