diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-29 04:57:37 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:16 -0300 |
| commit | 7f29aaf32835547ec58fc3fe0c00376f00e9eab9 (patch) | |
| tree | 5b1874ab4e95396e5bd2317766641577022e15db /test | |
| parent | e2452380ed42d3b418930e375780745612d599c5 (diff) | |
| download | pardes-7f29aaf32835547ec58fc3fe0c00376f00e9eab9.tar.gz pardes-7f29aaf32835547ec58fc3fe0c00376f00e9eab9.zip | |
/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 <[email protected]>
Diffstat (limited to 'test')
| -rw-r--r-- | test/fs.py | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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']) |
