From c9d27f179b096c4334bc01c2054a6bbf90e298de Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 4 Nov 2026 11:34:37 -0300 Subject: test: review of the core2 migration's tests: the column tag's Home seen to scroll its text back (the whole text drawn from its first cell), not only its caret; window keys' column tag left as it was by w, so normal mode is checked, not inferred; window mode's d seen to ask (ask del k j in /log) between two panes and not with one; Mini's Save seen to ask for a path (ask save path); the SPC j n command-output test trimmed to the walk back from a Look's pane, its whole-row and Tab checks the Themes walk test's already; each checked to fail against a break (header scroll never stepping back, a header entered in insert mode, Del never asking, Save on an output asking nothing), and a further ten breaks of the migrated tests' behaviour each failing its test (a jump landing at column 1, no file-in-another-pane fallback, Esc not leaving window mode, under-text placement a row low, a split inserted above, Mini never refreshing, a look walk selecting one cell, a PDF's / opening a text query, the same-visit merge off across panes, byte-wise backspace) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- test/behaviour/keys.zig | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'test/behaviour/keys.zig') diff --git a/test/behaviour/keys.zig b/test/behaviour/keys.zig index b6fe1e83..aa1128a3 100644 --- a/test/behaviour/keys.zig +++ b/test/behaviour/keys.zig @@ -226,7 +226,8 @@ test "keys: SPC j n and SPC j p walk Themes' rows, whole, never its section head try std.testing.expectEqualStrings(names.items[brk - 1]["Theme ".len..], try setting(&s, "Theme")); } -test "keys: SPC j n in a command output selects its whole row, Tab runs it, and from where a Look took the keyboard it walks on there" { +// Its rows whole and Tab running one are the Themes walk's test above. +test "keys: SPC j n from the pane a Look gave the keyboard walks back into the command output" { var tmp = std.testing.tmpDir(.{}); defer tmp.cleanup(); for ([_][]const u8{ "a.txt", "b.txt" }) |name| try tmp.dir.writeFile(std.testing.io, .{ .sub_path = name, .data = "x\n" }); @@ -242,8 +243,6 @@ test "keys: SPC j n in a command output selects its whole row, Tab runs it, and try std.testing.expect(themes != a); const sel = s.at("/pane/{d}/sel", .{themes}); try s.expect(sel, "Theme orchard"); - try s.keys(" jn\t"); - try std.testing.expect(std.mem.indexOf(u8, try s.read("/ctl"), "\nTheme dusk\n") != null); try s.write(s.at("/pane/{d}/exec", .{a}), "Look b.txt\n"); try std.testing.expect(try s.focused() != themes); try s.keys(" jn"); -- cgit v1.3