diff options
| author | Gabriel Schneider <[email protected]> | 2026-10-01 04:00:33 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 04:03:06 -0300 |
| commit | 9ac223e5436a9f5831c97382270dedbf9f13277d (patch) | |
| tree | 7d2bf31977f98cc81e7e9133e674d0f6e7bdfed5 /test | |
| parent | 8dc84e6f9f1c3802f1d28de4d49907381cdf224b (diff) | |
| download | pardes-9ac223e5436a9f5831c97382270dedbf9f13277d.tar.gz pardes-9ac223e5436a9f5831c97382270dedbf9f13277d.zip | |
--wait waits on the pane its look answered, read on the look's own open, not one found again by name in /index
The forwarded look was a write and nothing more, and --wait then
looked its file up in /index. /index shows names escaped (`\\` for a
backslash, `\xNN`), so a file named with one matched no pane and
--wait exited 0 at once, as if the pane were already closed. The look
is now asked on one open (Client.ask) and its answer is the pane
waited on; /index by name stays only for a look that answers none.
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
@@ -1395,6 +1395,22 @@ def test(binary, quic=False): assert time.monotonic() - deleted < .05, time.monotonic() - deleted assert second.wait(timeout=5) == 0 assert edited.read_bytes() == b'edited\n' + # --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. + odd = root / 'wait\\odd.txt' + odd.write_bytes(b'odd\n') + before = serials() + waiting = subprocess.Popen([binary, '--wait', str(odd)], cwd=root, env=env, + stdout=subprocess.DEVNULL, stderr=subprocess.PIPE) + deadline = time.monotonic() + 3 + while not serials() - before and time.monotonic() < deadline: + time.sleep(.01) + odd_pane, = serials() - before + time.sleep(.5) + assert waiting.poll() is None, waiting.stderr.read() + client.remove(f'/pane/{odd_pane}') + assert waiting.wait(timeout=5) == 0 # A name not there yet opens a pane named it, as acme's B does, # and Save creates it: git's and fish's temporary files are. fresh = root / 'wait new.txt' |
