summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/fs.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/fs.py b/test/fs.py
index 6c6bcbef..2ccd0690 100644
--- a/test/fs.py
+++ b/test/fs.py
@@ -1405,6 +1405,17 @@ def test(binary, quic=False):
dashed, = serials() - before
assert client.read(f'/pane/{dashed}/name').rstrip(b'\n') == str(dash).encode()
client.remove(f'/pane/{dashed}')
+ # A name under a directory that may not be searched is refused,
+ # permission denied, exit 1, no pane: its Save could never be.
+ (root / 'noperm').mkdir()
+ (root / 'noperm').chmod(0)
+ before = serials()
+ try:
+ denied = subprocess.run([binary, 'noperm/a/b/c'], cwd=root, env=env, capture_output=True, timeout=10)
+ finally:
+ (root / 'noperm').chmod(0o755)
+ assert denied.returncode == 1 and b'permission denied' in denied.stderr, denied
+ assert serials() == before
# --wait waits on the pane its look answered, on the look's own
# open: a name /index shows escaped (a backslash is `\\` there)
# is still the pane waited on, not one already gone.