summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-30 21:13:57 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:17 -0300
commit27f8f6e0a5bb2751e1642db1e7e68b2cf72e50b0 (patch)
treeae38cffc7f1b9fb71a6ea22d3cfec176756ef3b5 /test
parentb726f10d03f3c1141d99bf20e99a982026da785f (diff)
downloadpardes-27f8f6e0a5bb2751e1642db1e7e68b2cf72e50b0.tar.gz
pardes-27f8f6e0a5bb2751e1642db1e7e68b2cf72e50b0.zip
Forwarding to a running pardes says why in words: a name with a newline is "a file name is one line", never NotOneLine
The forwarding refusal printed the error's name for anything the session itself did not answer: NotOneLine, NotAFileName, NoWorkingDirectory. Those are now sentences, a dial failure is said as the message row says one, and any other error is its name's words. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'test')
-rw-r--r--test/fs.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/fs.py b/test/fs.py
index 9392ffb7..eba5a5fa 100644
--- a/test/fs.py
+++ b/test/fs.py
@@ -1391,6 +1391,14 @@ 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'),):
+ 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)
orphan = launch('--wait')
assert orphan.poll() is None
assert orphan.wait(timeout=5) == 1