summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-29 14:20:12 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:16 -0300
commit25c847e28ae77f5c648d423d64011736f55eda4a (patch)
tree38a2e3694a1c4db8ee0f6acebb420109e00d020a /test
parentb7d3c0c1d9b2ba4e5181e56f15015dd9c996c5a8 (diff)
downloadpardes-25c847e28ae77f5c648d423d64011736f55eda4a.tar.gz
pardes-25c847e28ae77f5c648d423d64011736f55eda4a.zip
Delcol on the last column leaves the window, empty but for its workspace tag, as acme's does
The last column's Delcol ended the session. The window now stays, with only the workspace tag; Newcol, and New (which makes the column it goes in), start it again. A word run with no pane at all runs with a stand-in that is no pane, the root ctl takes session words, and pane/new makes its scratch in the session's directory. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'test')
-rw-r--r--test/fs.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/fs.py b/test/fs.py
index 6a9e78f6..3c0ece79 100644
--- a/test/fs.py
+++ b/test/fs.py
@@ -847,6 +847,23 @@ def odd_paths(binary):
assert why in str(refused), (line, refused)
+def delcol_last_keeps_window(binary):
+ """Delcol on the last column leaves the window, empty but for the
+ workspace tag, as acme does; Newcol and New start again from there."""
+ with tempfile.TemporaryDirectory(prefix='pardes-delcol-') as directory:
+ with session(binary, Path(directory), 'delcol') as (client, _):
+ def columns():
+ return [l for l in client.read('/layout').decode().splitlines() if l and not l.startswith('active')]
+ while columns():
+ client.write(f'/col/{columns()[0].split()[0]}/ctl', b'Delcol\n')
+ # Still here, empty.
+ assert client.read('/index') == b'', client.read('/index')
+ client.write('/ctl', b'Newcol\n')
+ assert len(columns()) == 1, columns()
+ serial = new_pane(client, b'back\n')
+ assert str(serial).encode() in client.read('/index'), client.read('/index')
+
+
def cut_writes(binary):
"""A write bigger than a 9P message comes as several, cut anywhere: each
command line runs once, whole, an Edit block once it ends, and a last
@@ -880,6 +897,7 @@ def test(binary, quic=False):
started = time.monotonic()
cut_writes(binary)
odd_paths(binary)
+ delcol_last_keeps_window(binary)
run_file(binary)
exit_answers(binary)
unattended_messages_expire(binary)