summaryrefslogtreecommitdiff
path: root/test/tag_cleanup.py
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-20 00:36:50 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:14 -0300
commitc1990b3e6e196ad41379aa432bf3ccca8a65d9f0 (patch)
treed7ad5afe559f7f56464b14c3122242fa3f16399b /test/tag_cleanup.py
parent717afaf3177a2e0925b18ae3445119efe808b129 (diff)
downloadpardes-c1990b3e6e196ad41379aa432bf3ccca8a65d9f0.tar.gz
pardes-c1990b3e6e196ad41379aa432bf3ccca8a65d9f0.zip
Flatten the 9P control tree and move it out of fs.zig
The served tree loses the self/ level: /index /ctl /new /log /screen /listeners /pane/<n>/... /os, with /src only in -Dembed-sources=true builds (default off, on for esp32p4). ctl speaks the editor's own language with two lowercase verbs, look TEXT and exec TEXT, plus acme's addr verbs; the new/ factory directory becomes one clone file; cons is gone (exec Msg); name and sel are files; stats report real lengths, modes and mtimes; /log streams pane new/del/rename/save events. The tree code lives in src/ninep/ (tree, pane, ctl, addr, pty, events, screen, sources); fs.zig keeps host access, mounts, resolution and find/grep. Same engine and transports. README (fs-help.txt) and docs rewritten; tests updated and extended. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Diffstat (limited to 'test/tag_cleanup.py')
-rw-r--r--test/tag_cleanup.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/tag_cleanup.py b/test/tag_cleanup.py
index 52ee8e9d..7b7d8bbf 100644
--- a/test/tag_cleanup.py
+++ b/test/tag_cleanup.py
@@ -28,7 +28,7 @@ def run(args):
launch=launch, inherited=inherited, terminal=terminal) as (client, _):
keys = HostInput(terminal['input_fd'])
pdf = next(serial for serial, tag in panes(client).items() if str(source) in tag)
- pdf_tag = client.read(f'/self/pane/{pdf}/tag').decode().strip()
+ pdf_tag = client.read(f'/pane/{pdf}/tag').decode().strip()
require(pdf_tag.startswith(str(source) + ' [1/'), 'PDF name/page prefix missing')
require(pdf_tag.endswith('] Tty Del PdfSections PdfTint Collapse'), 'PDF commands missing')
require(all(word not in pdf_tag for word in ['PdfFit', 'filtered', 'full', 'disabled']), 'PDF tag contains fit or tint-state clutter')
@@ -36,7 +36,7 @@ def run(args):
before = set(panes(client))
execute(client, control, 'Tty')
tty = require(wait_for(lambda: next((s for s in panes(client) if s not in before), None)), 'terminal missing')
- client.write(f'/self/pane/{control}/ctl', b'delete\n') # owned command-only scratch
+ client.write(f'/pane/{control}/ctl', b'exec Del\n') # owned command-only scratch
def tag_position():
frame = client.screen()
@@ -64,11 +64,11 @@ def run(args):
keys.send(b'\t')
require(wait_for(lambda: (p := tag_position()) and p[2] == ' '), 'Mode from edited tag ignored parked raw mode')
keys.send(b'\x02')
- client.write(f'/self/pane/{tty}/pty/data', b"printf 'Mode toggle ready\\n'\r")
- require(wait_for(lambda: b'Mode toggle ready' in client.read(f'/self/pane/{tty}/body')), 'terminal input failed')
+ client.write(f'/pane/{tty}/pty/data', b"printf 'Mode toggle ready\\n'\r")
+ require(wait_for(lambda: b'Mode toggle ready' in client.read(f'/pane/{tty}/body')), 'terminal input failed')
capture(client, root, 'pdf-and-tty-tags', not args.tty)
require(source.read_bytes() == original, 'PDF file changed')
- client.write(f'/self/pane/{tty}/pty/data', b'exit\r')
+ client.write(f'/pane/{tty}/pty/data', b'exit\r')
print('PDF tag, Mode click, Ctrl-B, edited-tag execution and source preservation passed')