summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/fs.py20
1 files changed, 19 insertions, 1 deletions
diff --git a/test/fs.py b/test/fs.py
index ccf3eb89..82d7cf0b 100644
--- a/test/fs.py
+++ b/test/fs.py
@@ -245,6 +245,24 @@ def discovery(binary, embedded=False):
raise AssertionError('focus took a serial no pane has')
except OSError as refused:
assert 'no such window' in str(refused), refused
+ # /ctl reads the settings as a write takes them and takes the
+ # session's builtins; a pane's ctl takes the pane's.
+ settings = client.read('/ctl')
+ assert b'Verbose ' in settings and b'Platform' not in settings, settings
+ client.write('/ctl', settings)
+ assert client.read('/ctl') == settings
+ client.write('/ctl', b'Verbose off\n')
+ assert b'Verbose off\n' in client.read('/ctl')
+ for path, line, why in (('/ctl', b'Del\n', 'not a session control message "Del"'),
+ ('/ctl', b'Nope 3\n', 'unknown control message "Nope 3"'),
+ (f'/pane/{first}/ctl', b'Newcol\n', 'not a window control message "Newcol"')):
+ try:
+ client.write(path, line)
+ raise AssertionError(f'{path} took {line!r}')
+ except OSError as refused:
+ assert why in str(refused), refused
+ 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'])
assert set(client.list('/pane')) == {'new', str(fixture), str(first), str(second)}
client.write(f'/pane/{first}/body', b'first pane', truncate=True)
assert client.read(f'/pane/{first}/body') == b'first pane'
@@ -315,7 +333,7 @@ def discovery(binary, embedded=False):
assert client.read('/src/pardes.zig').startswith(b'const std')
assert client.stat('/src/pardes.zig')['mode'] == 0o444
assert b'pub const Pardes' in client.read(f'/pane/{look(client, "/virtual/src/pardes.zig")}/body')
- print('9P discovery: listing/stat/find are inert; new, remove, look, exec, name, sel, log, ctl lock and focus behave')
+ print('9P discovery: listing/stat/find are inert; new, remove, look, exec, name, sel, log, ctl lock, focus and the ctl split behave')
def run_file(binary):