diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-30 11:48:22 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:17 -0300 |
| commit | fc8e1abf361ab2151109e68e5c88a0ed45650b38 (patch) | |
| tree | e39977dbf694d185ae5348af5e572c0393320d50 /test | |
| parent | f7c22573915cd4ecb98ef400b0914949ed07874e (diff) | |
| download | pardes-fc8e1abf361ab2151109e68e5c88a0ed45650b38.tar.gz pardes-fc8e1abf361ab2151109e68e5c88a0ed45650b38.zip | |
pardes NEWFILE in a pane forwards even when its directory is missing, and Save makes the directories
fs.md said FILE must already exist, while `pardes new.txt` in fact
forwarded, making a pane named for it that Save creates. With a missing
directory (`pardes notes/new.txt`) the launch gave up forwarding and started
a nested editor inside the pane. Now the name is made absolute as written
and forwarded the same way. A name written to a pane's name file that goes
into a directory not there has its Save make the directories, as Config's
pane does. A Save <path> into a missing directory still fails ENOENT. The
Forwarding section now says what a new FILE does. fs.py launches one into a
missing directory and saves it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'test')
| -rw-r--r-- | test/fs.py | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -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 |
