diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-05 19:32:34 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-05 22:03:21 -0300 |
| commit | 8fe1cbd5ba5792b71f4a1b9be6f3e8df591ec52b (patch) | |
| tree | 6977f394e1f07e9cee6f4ebe791de3e09ba95c4e /test/pdf.zig | |
| parent | 542e6677e23e277ce39edb3e96d729e9adca99d0 (diff) | |
| download | pardes-8fe1cbd5ba5792b71f4a1b9be6f3e8df591ec52b.tar.gz pardes-8fe1cbd5ba5792b71f4a1b9be6f3e8df591ec52b.zip | |
split pardes.zig by noun, Jump: the jump list's functions and its place type move into src/Jump.zig, the clean room's name: Loc and the path cap a closed place names, jumpPath, samePlace, trackJump and jumpBy (the list's fields stay the session's until #38); callers name Jump (builtins.zig's Back and Forward, mouse.zig's side buttons, sync's trackJump, test/pdf.zig as pardes.Jump); the session's recentDot is pub for it; tests moved with them, by name: the jump list never holds two entries in a row the same, when the one between them goes; jump history skips an entry whose pane slot or serial is gone, leaving the selection; Back and Forward take the same steps from the mouse's side buttons and jumpBy (and its JumpsTest); jump history terminal rectangle follows output and clears on reflow; a pure move, no field touched, a dump and the wire as they were; gates on tui: core-test 960/960, behaviour-test 238/238, pane-test 171/172 (1 skipped)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'test/pdf.zig')
| -rw-r--r-- | test/pdf.zig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/pdf.zig b/test/pdf.zig index de7afb95..722e28b4 100644 --- a/test/pdf.zig +++ b/test/pdf.zig @@ -2121,7 +2121,7 @@ test "a PDF's jumps: Back after a far jump returns to the exact offset, two plac look.lookAt(p, id, if (pv.page_count > 3000) ":3000" else ":4"); try jumpFrame(p); try std.testing.expect(pv.page >= 3); - p.jumpBy(-1); + pardes.Jump.jumpBy(p, -1); try jumpFrame(p); try std.testing.expectEqual(@as(usize, 1), pv.page); try std.testing.expectApproxEqAbs(near, pv.document_scroll_y, 0.5); @@ -2157,12 +2157,12 @@ test "a PDF's jumps: JumpScope file keeps to the PDF, and a closed PDF reopens a p.active = doc; _ = try stripAtPlace(p, pane, 3, 0.5); // Back from the PDF keeps to it: its own earlier place, not the text. - p.jumpBy(-1); + pardes.Jump.jumpBy(p, -1); try jumpFrame(p); try std.testing.expectEqual(doc, p.active); try std.testing.expectApproxEqAbs(first, pane.pdf.?.document_scroll_y, 0.5); // Closed, its entries stay; Back from the text reopens it at the place. - p.jumpBy(1); + pardes.Jump.jumpBy(p, 1); try jumpFrame(p); try p.removePane(doc, null); try jumpFrame(p); @@ -2171,7 +2171,7 @@ test "a PDF's jumps: JumpScope file keeps to the PDF, and a closed PDF reopens a try std.testing.expect(closed); var tries: usize = 0; while (tries < 4) : (tries += 1) { - p.jumpBy(-1); + pardes.Jump.jumpBy(p, -1); try jumpFrame(p); if (p.panes[p.active].?.pdf != null) break; } |
