diff options
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']) |
