diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/fs.py | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -338,6 +338,14 @@ 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') + # An open of data with OTRUNC (a shell's >) deletes the addressed + # range only, so the write after it replaces that range. + scratch = new_pane(client, b'hello world\nsecond line\n') + client.write(f'/pane/{scratch}/addr', b'#0,#5') + client.write(f'/pane/{scratch}/data', b'HOWDY', truncate=True) + assert client.read(f'/pane/{scratch}/body') == b'HOWDY world\nsecond line\n' + client.remove(f'/pane/{scratch}') + print('9P discovery: listing/stat/find are inert; new, remove, look, exec, name, sel, log, ctl lock, focus, the ctl split and commands behave') |
