diff options
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' |
