summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-30 21:14:06 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:17 -0300
commita2c719779c9ce0f676fb159135675df6275e77bf (patch)
treedd4752d91d50f73a4b1ed7ff031bfea00c6aac62 /test
parent27f8f6e0a5bb2751e1642db1e7e68b2cf72e50b0 (diff)
downloadpardes-a2c719779c9ce0f676fb159135675df6275e77bf.tar.gz
pardes-a2c719779c9ce0f676fb159135675df6275e77bf.zip
Forwarding pardes @pN for a pane the session has not is refused, "this session has no such pane", exit 1 and no pane made; one it has is looked at
@p999:1 was taken as a new file's name, so a pane named <cwd>/@p999 was made and the launch succeeded; an @pN the session did have was the same stray pane. A pane address is now checked against the session: one it has is a look at it, one it has not is refused with the reason and exit 1, as a refused name is. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'test')
-rw-r--r--test/fs.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/fs.py b/test/fs.py
index eba5a5fa..7061c61f 100644
--- a/test/fs.py
+++ b/test/fs.py
@@ -1391,14 +1391,21 @@ def test(binary, quic=False):
assert refused.returncode == 1, refused
assert b'bad character in file name' in refused.stderr, refused.stderr
assert serials() == before, (serials(), before)
- # A name with a newline is said in words, not an error's name.
- for word, said in (('two\nlines.txt', b'a file name is one line'),):
+ # A pane address the session has not is refused in words, exit
+ # 1, no pane made for a file of that name; one it has is looked
+ # at. A name with a newline is said in words, not an error name.
+ for word, said in (('@p999:1', b'pardes: @p999:1: this session has no such pane'),
+ ('two\nlines.txt', b'a file name is one line')):
refused = subprocess.run([binary, word], cwd=root, env=env,
stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=10)
assert refused.returncode == 1, refused
assert said in refused.stderr, refused.stderr
assert b'NotOneLine' not in refused.stderr and b'NoSuchPane' not in refused.stderr
assert serials() == before, (serials(), before)
+ looked = subprocess.run([binary, '@p1:1'], cwd=root, env=env,
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=10)
+ assert looked.returncode == 0, looked.stderr
+ assert serials() == before, (serials(), before)
orphan = launch('--wait')
assert orphan.poll() is None
assert orphan.wait(timeout=5) == 1