diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/next-tests.md | 40 |
1 files changed, 36 insertions, 4 deletions
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/<label>.zig holds the tests,** a file a section of + the book named by its label (`other-files` is other_files.zig), each + test's name its label first. + - **The `behaviour-test` step:** its module imports `session` alone, so + a behavioural test that reaches for `pardes` does not compile. That + boundary is the lint. + - **Expectations are inline;** goldens stay where they are. +- **A surface is added when a test being migrated needs one,** as a word in + a file that exists where it can be (a pane ctl's read already ends + `collapsed fit:… tint:…`; rio's wctl read is its window's rectangle). +- **A migration is one commit:** the behavioural test in, the M test it + replaces out, and the break it was checked against named. Phases 2 and 4 + are one. +- **A replica's agreement is checked opt-in** (a Session option, to come), + for kbdin and mousein input, which a replica takes as events. - **Later, not now:** - The reference as the spec: one test per documented behaviour, named by its section (docs/typ/reference.typ for the 9P surface, guide.typ and @@ -32,7 +52,6 @@ agent's survey. The `e2e` line (kbdin, mousein) is its first step. | T1 | the core through `serveFs`, in process | most behaviour; each case also through a replica that must agree | | T2 | a real `pardes` over its socket, a Zig runner | daemon, attach, mounts, shells, flags | | T3 | terminal bytes, the `.snap` scripts | tty rendering and keys | - | T4 | the window: `pardes-gui` hidden (`PARDES_TEST`, offscreen), its input through the same 9P files, frames captured once its status file says idle | what only pixels show | | perf | T1 or T4 gestures, timed | latency gates against baselines | @@ -80,6 +99,19 @@ What the M tests reach into, and the public surface for it: | `.pdf.?` | 25 | **missing**: page, viewport | | terminal cursor, overlay | 60 | partial | +## Progress + +Left to migrate, a file a row (`grep -c '^test "' <file>` before and +after; M as the inventory classed them): + +| file | M at the start | moved | checked against | +|---|---|---|---| +| src/ninep/ctl.zig | 82 | 5 | `collapsed ` left off the ctl read; Putall saving nothing | + +Migrated so far, in test/behaviour/: other_files (kbdin, mousein), panes +(collapsed, name's leading blank, Putall), edit (an Edit block to a pane's +ctl, the root's and exec, one left open at its clunk an err in the log). + ## Phases 0. Inventory. Done, above. |
