From d197289c331365081295cb44f27ee2893294cffa Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 3 Nov 2026 16:17:51 -0300 Subject: test: the behaviour-test step and test/session.zig, T1 of docs/next-tests.md: a Session drives the core as a 9P client does (walk by path, open, read or write, clunk, held lines run at the clunk as src/9p_io.zig runs them), the core opaque and the step's module importing session alone, so a behavioural test cannot reach past the 9P tree; keys (kbdin), click (on text found on /screen, mousein), screen, focused, refused and the refusal's words; test/behaviour/{other_files,panes,edit}.zig, a file a section of the reference: kbdin and mousein, a collapsed pane's ctl, name's leading blank, Putall, Edit blocks, moved out of src/ninep/ctl.zig (an Edit block left open now checked as a client sees it, an err in the log at its clunk), each checked to fail against a break (collapsed left off the ctl read, Putall saving nothing); the plan doc says the layout, the decisions and the progress Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- docs/next-tests.md | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) (limited to 'docs/next-tests.md') diff --git a/docs/next-tests.md b/docs/next-tests.md index f05a6e73..7dbbff60 100644 --- a/docs/next-tests.md +++ b/docs/next-tests.md @@ -15,9 +15,29 @@ agent's survey. The `e2e` line (kbdin, mousein) is its first step. - **T1, in-process 9P, is the main tier.** The core is driven only through `serveFs` (src/ninep/testing.zig's `call`, `rd`, `wr`): as behavioural as a client on a socket, and milliseconds a case. -- **Process-level tests (T2) get a Zig runner, not Python.** The Python - suites (test/fs.py and the rest) stay as examples of scripting a session - and are not grown. +- **Process-level tests (T2) get a Zig runner, not Python:** test/snapshot.zig, + the `.snap` runner, which already forks the app in a pty and has a 9P + client (`snap9p`), grows 9P verbs (`9pwrite`, `9pexpect`, `signal`). The + Python suites (test/fs.py and the rest) stay as examples of scripting a + session and are not grown. +- **Layout (from a ponytail review, 2026-11-03):** + - **test/session.zig is the T1 `Session`:** a 9P client's walk, open, + read or write, clunk, by path, with the core opaque. + - **test/behaviour/