From 49ed5492dec8275ace22e37003f4de548b2d2fc5 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 4 Nov 2026 11:19:29 -0300 Subject: 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 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- test/pdf.zig | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'test/pdf.zig') 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; -- cgit v1.3