summaryrefslogtreecommitdiff
path: root/test/pdf.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-04 11:19:29 -0300
committerGabriel Schneider <[email protected]>2026-11-04 11:20:50 -0300
commit49ed5492dec8275ace22e37003f4de548b2d2fc5 (patch)
tree92fd6c3750da7a558b4ab8ee4ec09cd3f477e830 /test/pdf.zig
parenta5504e6e808c5b147e114d43b5c165bbe714f3c3 (diff)
downloadpardes-49ed5492dec8275ace22e37003f4de548b2d2fc5.tar.gz
pardes-49ed5492dec8275ace22e37003f4de548b2d2fc5.zip
test: test/pdf.zig's PDF normal-mode keys through the 9P tree alone, in test/behaviour/keys.zig: in a PDF, : giving its tag the keyboard in normal mode and : again the body back, SPC a leader (its keys shown at the row's end) that a key it has not cancels, and / a search prompt that Esc closes, the PDF keeping the keyboard; each checked to fail against a break (a PDF's : doing nothing, its / doing nothing, its SPC not starting the leader)
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.zig28
1 files changed, 0 insertions, 28 deletions
diff --git a/test/pdf.zig b/test/pdf.zig
index a068fc40..16522af6 100644
--- a/test/pdf.zig
+++ b/test/pdf.zig
@@ -1146,34 +1146,6 @@ fn copySourceRect(
return out;
}
-test "PDF normal mode keeps `:`, SPC and `/` on their shared paths" {
- if (!pdf_enabled or platform == .web) return;
-
- const p = try Pardes.init(std.testing.allocator, .{
- .file = "docs/design.pdf",
- .cols = 80,
- .rows = 24,
- });
- defer p.deinit();
- const pane = p.panes[0].?;
- p.native_images = false;
-
- // Cross-pane BODY-NORMAL actions keep their established shared paths.
- p.update(.{ .key = .{ .cp = ':' } });
- try std.testing.expect(pane.focus == .tag);
- try std.testing.expectEqual(Mode.normal, pane.body.mode);
- p.update(.{ .key = .{ .cp = ':' } });
- try std.testing.expect(pane.focus == .body);
- p.update(.{ .key = .{ .cp = ' ' } });
- try std.testing.expect(p.leader_on);
- p.update(.{ .key = .{ .cp = '!' } });
- try std.testing.expect(!p.leader_on);
- p.update(.{ .key = .{ .cp = '/' } });
- try std.testing.expect(pane.prompt == .search and pane.focus == .body);
- p.update(.{ .key = .{ .cp = Key.escape } });
- try std.testing.expect(pane.prompt == .none);
-}
-
test "Escape cancels PDF chrome in place, then leaves the pane; Shift-Escape leaves at once" {
if (!pdf_enabled or platform == .web) return;