diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-29 01:21:21 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:15 -0300 |
| commit | 8743acbf8edd5e08e639f68022d135a244052658 (patch) | |
| tree | 29fc69ab22a6c0a65f759d9fba44546643961979 /test/fs.py | |
| parent | 34b631e75dd646809961cae0ab215b6c43643a13 (diff) | |
| download | pardes-8743acbf8edd5e08e639f68022d135a244052658.tar.gz pardes-8743acbf8edd5e08e639f68022d135a244052658.zip | |
The tree's README fits its 45 lines again, and fs-discovery-test knows the new entries
/README had grown to 51 lines with the layout files and the round 8 notes,
past the 45 the discovery test holds it to. It is condensed (the log's
record names on one line, the column files on one, two examples fs.md
covers), and fs-discovery-test lists layout, tag and col, reads /index's
new last field, and reads /commands' setting values.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'test/fs.py')
| -rw-r--r-- | test/fs.py | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -148,7 +148,8 @@ def discovery(binary, embedded=False): top = client.list('/') # A set: which files the root holds, not the order a listing gives. assert set(top) - {'src', 'shaders'} == {'README', 'index', 'status', 'focus', 'ctl', 'commands', - 'look', 'exec', 'log', 'screen', 'listeners', 'pane', 'os'}, top + 'look', 'exec', 'log', 'screen', 'listeners', 'layout', 'tag', + 'pane', 'col', 'os'}, top assert 'self' not in top and 'cons' not in top and 'new' not in top, top assert ('src' in top) == embedded, (top, embedded) before = client.read('/index') @@ -180,7 +181,7 @@ def discovery(binary, embedded=False): assert client.read('/pane/1/dirty') == b'0\n' assert client.read('/pane/1/scroll') == b'1\n' fixture = int(before.split()[0]) - assert before.split()[1:3] == [b'text', b'0'] and before.endswith(b'/discovery.txt\n'), before + assert before.split()[1:3] == [b'text', b'0'] and before.rsplit(b' ', 1)[0].endswith(b'/discovery.txt'), before # /status reports the editor; /exec has nothing to report yet. status = dict(line.split(maxsplit=1) for line in client.read('/status').decode().splitlines()) assert int(status['pid']) > 0 and status['version'] and int(status['panes']) >= 1, status @@ -266,7 +267,9 @@ def discovery(binary, embedded=False): assert why in str(refused), refused commands = client.read('/commands').decode().splitlines() assert 'Newcol root' in commands and 'Save arg pane' in commands, commands - assert all(row.split()[-1] in ('root', 'pane') for row 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 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']) |
