From 7f29aaf32835547ec58fc3fe0c00376f00e9eab9 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 29 Sep 2026 04:57:37 -0300 Subject: /commands says what each word does, and that the root's ctl takes Edit A /commands line gave a word, its argument and root or pane, but not what it does, and called Edit a pane's word though the root's ctl takes it too. Each line now ends with -- and the first sentence of the word's doc comment (read from builtins.zig itself, so there is one copy), and Edit is both. fs.md says a pane's word such as Undo or Msg is refused at the root. Co-Authored-By: Claude Opus 5.5 --- test/fs.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/fs.py b/test/fs.py index 09d366b5..9fb560e0 100644 --- a/test/fs.py +++ b/test/fs.py @@ -270,10 +270,12 @@ def discovery(binary, embedded=False): except OSError as refused: assert why in str(refused), refused commands = client.read('/commands').decode().splitlines() - assert 'Newcol root' in commands and 'Save arg pane' in commands, commands - # word, `arg` if it takes one, its ctl, then a setting's values - assert all(row.split()[2 if row.split()[1] == 'arg' else 1] in ('root', 'pane') for row in commands), commands - assert 'Placement arg root acme,pardes' in commands, commands + def row(start): + return any(r == start or r.startswith(start + ' ') for r in commands) + assert row('Newcol root') and row('Save arg pane') and row('Edit arg both'), commands + # word, `arg` if it takes one, its ctl, a setting's values, then `-- ` what it does + assert all(r.split()[2 if r.split()[1] == 'arg' else 1] in ('root', 'pane', 'both') for r in commands), commands + assert row('Placement arg root acme,pardes'), commands assert client.stat('/commands')['length'] == len('\n'.join(commands)) + 1 client.write(f'/pane/{first}/ctl', b'Msg said through ctl\n') assert 'said through ctl' in ''.join(cell[0] for cell in client.screen()['cells']) -- cgit v1.3