diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/fs.py | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -344,6 +344,18 @@ def discovery(binary, embedded=False): 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' + # sam's regexps: ^ at any line; a miss says so and leaves no + # address, so the data write after it refuses. + client.write(f'/pane/{scratch}/addr', b'/^second/') + assert client.read(f'/pane/{scratch}/addr') == b' 12 18 ' + for path, data, why in ((f'/pane/{scratch}/addr', b'/nowhere/', 'no match for regexp'), + (f'/pane/{scratch}/data', b'LOST', 'no address')): + try: + client.write(path, data) + raise AssertionError(f'{path} took {data!r}') + except OSError as refused: + assert why in str(refused), refused + 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') |
