diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/fs.py | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1306,6 +1306,14 @@ def test(binary, quic=False): # opened is deleted, as an $EDITOR must; one on a file already open # waits on that pane; a session that goes away ends it with 1. with session(binary, root, 'wait') as (client, address): + # A second --detach of a name a live session holds: said, exit 1, + # no Zig error trace. + second_env = {k: v for k, v in os.environ.items() if not k.startswith('PARDES_')} + second_env.update(HOME=str(root), XDG_RUNTIME_DIR=str(root)) + second = subprocess.run([binary, '--detach=wait'], cwd=root, env=second_env, + stdout=subprocess.DEVNULL, stderr=subprocess.PIPE, timeout=20) + assert second.returncode == 1, second + assert second.stderr == b'pardes: a session named wait is already running\n', second.stderr status = dict(line.split(maxsplit=1) for line in client.read('/status').decode().splitlines()) env = {k: v for k, v in os.environ.items() if k != 'PARDES_FORWARD_LOOK'} env.update(PARDES_9P=str(address), PARDES_PANE='1', PARDES_PID=status['pid']) |
