summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/fs.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/fs.py b/test/fs.py
index 6f1165e5..a6cd332e 100644
--- a/test/fs.py
+++ b/test/fs.py
@@ -1294,6 +1294,22 @@ def test(binary, quic=False):
client.remove(f'/pane/{named}')
assert made.wait(timeout=5) == 0
assert fresh.read_bytes() == b'new\n'
+ # ...in a directory not there either: forwarded all the same, and
+ # Save makes the directories.
+ deep = root / 'wait-missing' / 'sub' / 'new.txt'
+ before = serials()
+ made = subprocess.Popen([binary, 'wait-missing/sub/new.txt'], cwd=root, env=env,
+ stdout=subprocess.DEVNULL, stderr=subprocess.PIPE)
+ assert made.wait(timeout=5) == 0, made.stderr.read()
+ deadline = time.monotonic() + 3
+ while str(deep).encode() not in client.read('/index'):
+ assert time.monotonic() < deadline, 'a name in a missing directory opened no pane named it'
+ time.sleep(.01)
+ named, = serials() - before
+ client.write(f'/pane/{named}/body', b'deep\n')
+ execute(client, named, 'Save')
+ client.remove(f'/pane/{named}')
+ assert deep.read_bytes() == b'deep\n'
orphan = launch('--wait')
assert orphan.poll() is None
assert orphan.wait(timeout=5) == 1