summaryrefslogtreecommitdiff
path: root/test/behaviour/other_files.zig
Commit message (Collapse)AuthorAge
* settings #5, three behaviour knobs go, each the value it had by default: ↵Gabriel Schneider11 days
| | | | | | | ProgramEsc (in a raw terminal Esc goes back a pane and Shift-Esc is the program's Esc; keys.zig's at-the-prompt Esc, which only ProgramEsc reached, goes), JumpScope (Back and Forward keep to the focused pane's file first; Jump.jumpBy's scope test goes) and WindowBlur (the macOS window draws no blur: macos.zig's pardes_window_blur, its header line, and AppDelegate.swift's NSVisualEffectView backdrop go, built nowhere here; Capabilities.window_blur with them); deleted tests: "with ProgramEsc raw tty Escape only leaves at a shell prompt", "modes: with JumpScope all, Ctrl-o and Ctrl-i take every place in the order it was jumped to, and bare JumpScope is file again", "window blur defaults off and validates without changing opacity", macos.zig's "mac window blur builtin reaches the ABI without changing opacity", and the JumpScope all half of "settings: Back and Forward written to exec keep to the focused file"; rewritten: dump's settings test on Wrap, the PDF jump test without its scope check, other-files' jump to a closed file from the +Jumps listing (no file to keep to); the reference, guide, helix-keys and macos docs lose the three; no golden changes; gates on tui: core-test 961/961, behaviour-test 240/240, unit-test 1476/1477, pane-test 171/172, snap all 105 scripts ok, process-test 0 of 37 failed; gui unit-test 1520/1521 Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* store: Recent is a value of the user's state file, `pardes.xitdb` in the ↵Gabriel Schneider11 days
| | | | | | | DumpDir (src/Db.zig: the xitdb database the architecture's §14 puts everything pardes keeps on disk in), which every session shares: read at a session's start (now after the startup config, whose DumpDir says where the file is) and again on use when the file's committed size has moved, written at the end of a step that changed it in one transaction under the file's lock, taken without waiting (busy, the next step tries again), another session's commit read and merged under this one's changes first; not fsynced, as the `recent` file was not (a xitdb commit costs 20 us without fsync and 5.2 ms with its two on this btrfs); a file there that is no database of pardes's is kept aside as `pardes.xitdb.broken` and a new one started; Store.zig keeps the closed panes alone (its file half goes: the path and its inode/size/mtime stamp, load, refresh, read, flush and write, and W4's one-time read of the old `store`, which comes back with the migration), Options.recent_path becomes Options.state (off, disk, memory), main.recentPath goes, a Restore's new core takes the old one's database, and the test host's sessions keep theirs in a `.memory` database, the same code; measured (Debug, 200 files listed): flush after an open 133-135 us (W4's file: 124), refresh after another session's write 239-247 us (198), refresh with nothing new 3 us (1), a session started on it 1144-1194 us (1214), and a Recent change adds 12,325 bytes to the file (its 12,089 bytes of lines and 236 of xitdb's); tests: Store.zig's four Recent tests become Db.zig's three (two windows sharing Recent through a busy lock, the newest 200, a file that is no database kept aside; the old store's migration test goes with that read), the closed-pane test keeps its second window on a state file in its DumpDir, the behaviour suite gains 'two sessions on one state file share Recent', and the process tests and the canary look for the state file where they looked for `recent` Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* test: review of the ctl migration: the second LookWord list look checked ↵Gabriel Schneider12 days
| | | | | | | refilled with beta's places (its +Search body's words.txt:1:7-10), not only the one +Search; a failing builtin's test again refuses Msg a\x01b on the root exec with its control-character reason, as the old test did; a look opening a spaced path checks the source's ctl undo flag still 0 (the old revision and undo_len checks; the first 60 bytes stopped at dirty); a name's own backslash doubled in /index and in /recent's closed row moved to test/behaviour/other_files.zig through a name write to a file named back\nslash, the old /index and /recent tests trimmed to their setCwd control bytes and newline (no 9P name holds one); each checked to fail against a break (events' backslash doubling skipped, the second look searching alpha again, both control-character checks letting \x01 through); ten of the migrated tests checked against the reviewer's own breaks (fitErr's end left mid-character, Tab taking 0, a deleted file's Back step not going on, Delete asking, recentKeeps keeping a non-local name, a 1 MiB line not discarding its tail, is a dir not EISDIR, an event range backwards taken, DEL let through both checks, a remembered place's column clamped past the line) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* test: the Recent, Jumplist and Back/Forward group of src/ninep/ctl.zig, nine ↵Gabriel Schneider12 days
| | | | | | | tests, through the 9P tree alone: in test/behaviour/other_files.zig Jumplist refilling its one +Jumps, a Jumplist entry (closed) only while no pane has its file, Recent's row of an open file at its dot now, a closed file found again (/recent and Recent list it closed, a look at its row reopens it at its dot, a Back under JumpScope all too), Back and Forward over a closed file's two entries reopening it once, Recent keeping only files on disk, Back over a closed file deleted since skipping it and saying so, and a remembered place clamped to the file as it is now; in settings.zig Back and Forward written to exec keeping to the focused file, and JumpScope all taking every place in order; each checked to fail against a break (refillOrOpen never refilling, a look's reopen not relinking a closed entry, Recent's open row at its closing place, Recent's (closed) word, a jump's reopen relinking no other entry, JumpScope's file test inverted, recentKeeps keeping any local name, Back's deleted words, the clamp's words) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
*-. merge the four behavioural-test migrations (ninep, panes, core, pdf): 101 ↵Gabriel Schneider13 days
|\ \ | | | | | | | | | | | | | | | | | | tests moved off internals onto Session, each checked against a break by its migrator and a sample by a reviewer; test/behaviour/ holds 108; Session's area methods spliced in (one where and the optional cursor kept, its callers taking .?), helpers that clashed renamed; docs/next-tests.md's progress table, what the M left need, and the traps found in Session Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
| | * test: five of test/pdf.zig's tests through the 9P tree alone: a PDF's body a ↵Gabriel Schneider13 days
| |/ | | | | | | | | | | | | line for each line of its page's text (panes), PdfTint stepped in its ctl and never in its tag, refused at another pane (panes), PdfSections on a PDF with no outline opening nothing (panes, a PDF written by the test), /recent keeping a PDF open then closed (other_files), the pages a PDF shown as text turns for j/k, Ctrl-d/u/f/b, ge, gg, 3gg, 2G and the editing keys consumed (keys, a new file); the parts with no surface stay as two small tests (tint colours of a theme with none, `:`/SPC/`/` on a PDF); each checked to fail against a break (the page text's newline a blank, toggleTint not stepping, the no-outline check dropped, a PDF given no Recent place, a counted text-mode j taking half its count) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* / test: four more of src/ninep/ctl.zig's tests through the 9P tree alone, on ↵Gabriel Schneider13 days
|/ | | | | | | opens a test holds: Session's hold, readFid, writeFid and clunk (and truncate, readAt and stat for the pane files' tests next), an open kept as an event reader or a lock holder keeps one; lock and unlock on one ctl open against another (test/behaviour/panes), the event reader taking a pane's look, exec and tag clicks and acting on them written back, a refused Del written back EIO (new test/behaviour/event), /pager answering on the open that asked (other_files); each checked to fail against a break: another open's lock taken, a reader never taking a click, an event write-back's failure not captured, /pager answering the session's last result; the old pager test's two-line write refused is a handle-less write's alone (an open takes the second line as the text) and is gone Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* fs: a pane's ctl read ends with its mode (mode:normal|insert|select|tty, ↵Gabriel Schneider13 days
| | | | | | | select being normal mode extending), and kbdin takes Plan 9's Kalt, Kshift and Kctl runes (U+F015-F017), each adding its modifier to the key after it, an Alt or Ctrl key typing no text: the two surfaces the behavioural tests' inventory found most wanted (90 tests read body.mode, 18 send Alt or Shift); the tests that pinned the ctl line's end look for its words instead Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* test: the behaviour-test step and test/session.zig, T1 of ↵Gabriel Schneider13 days
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 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge