diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/fs.py | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -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) |
