summaryrefslogtreecommitdiff
path: root/test/fs.py
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-28 11:22:53 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:14 -0300
commit1c3842f136b9f98fae784559ec12d66d629c5909 (patch)
tree9a53e64542e191b717052dbe5b5cd79cfd2c0754 /test/fs.py
parent5cf50930dee214fb641bb95bbf8639b8f76930d9 (diff)
downloadpardes-1c3842f136b9f98fae784559ec12d66d629c5909.tar.gz
pardes-1c3842f136b9f98fae784559ec12d66d629c5909.zip
Exit quits and Kill stops commands, as in acme
Kill quit the editor, which in acme is Exit; acme's Kill stops the commands it started. Exit now quits as acme's does (exec.c, rowclean): it refuses once, naming each pane with unsaved text, and quits when asked again with nothing edited since (a small scratch is not asked about). Kill, bare or with names, stops the commands pardes typed into a terminal (an exec, a middle click, a pty/run) while their shell's marks say they run, by SIGTERM to the terminal's foreground job, never to the shell (acme posts the kill note, which terminates). Both are session builtins; the topbar's Kill becomes Exit, same width, and every golden's topbar row changed by exactly that word (checked line by line); the builtins script scrolls one more row for the index's new line. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'test/fs.py')
-rw-r--r--test/fs.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/fs.py b/test/fs.py
index e9540169..2199a645 100644
--- a/test/fs.py
+++ b/test/fs.py
@@ -405,12 +405,12 @@ def run_file(binary):
assert closing == [b'error shell gone\n'], closing
-def kill_answers(binary):
- """Kill written to /ctl is answered before the editor quits."""
- with tempfile.TemporaryDirectory(prefix='pardes-kill-') as directory:
+def exit_answers(binary):
+ """Exit written to /ctl is answered before the editor quits."""
+ with tempfile.TemporaryDirectory(prefix='pardes-exit-') as directory:
seen = {}
- with session(binary, Path(directory), 'kill', terminal=seen) as (client, _):
- client.write('/ctl', b'Kill\n')
+ with session(binary, Path(directory), 'exit', terminal=seen) as (client, _):
+ client.write('/ctl', b'Exit\n')
deadline = time.monotonic() + 5
while time.monotonic() < deadline:
try:
@@ -421,13 +421,13 @@ def kill_answers(binary):
break
time.sleep(.01)
else:
- raise AssertionError('Kill did not quit the editor')
+ raise AssertionError("Exit did not quit the editor")
def test(binary, quic=False):
started = time.monotonic()
run_file(binary)
- kill_answers(binary)
+ exit_answers(binary)
for options, message in [
(['--fs'], b'no such option'),
(['--fs9'], b'no such option'),