summaryrefslogtreecommitdiff
path: root/test/behaviour/other_files.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-05 23:27:29 -0300
committerGabriel Schneider <[email protected]>2026-11-05 23:58:31 -0300
commitcd3627307740896426830423598d2e1a8e27b024 (patch)
tree8cb845c8da5d07c15d9d234f285bff9cffb83449 /test/behaviour/other_files.zig
parent342650183a54dcfcdce6ca4d45d6fdf48b2d1c1c (diff)
downloadpardes-cd3627307740896426830423598d2e1a8e27b024.tar.gz
pardes-cd3627307740896426830423598d2e1a8e27b024.zip
settings #5, three behaviour knobs go, each the value it had by default: 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
Diffstat (limited to 'test/behaviour/other_files.zig')
-rw-r--r--test/behaviour/other_files.zig14
1 files changed, 6 insertions, 8 deletions
diff --git a/test/behaviour/other_files.zig b/test/behaviour/other_files.zig
index ae4c2928..bd8cbccd 100644
--- a/test/behaviour/other_files.zig
+++ b/test/behaviour/other_files.zig
@@ -150,7 +150,7 @@ test "other-files: Recent's row for a file still open is where its dot is now, n
try std.testing.expect(has(rows, "\na.txt:2:3 open\n"));
}
-test "other-files: a closed file is found again: Recent and /recent list it closed, a look at its row reopens it at its dot, and a jump back does too" {
+test "other-files: a closed file is found again: Recent and /recent list it closed, a look at its row reopens it at its dot, and a jump to it does too" {
var tmp = std.testing.tmpDir(.{});
defer tmp.cleanup();
try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "a.txt", .data = "one\ntwo\nthree\n" });
@@ -181,13 +181,11 @@ test "other-files: a closed file is found again: Recent and /recent list it clos
// to it opens it again.
try s.write(s.at("/pane/{d}/ctl", .{back}), "Del\n");
try std.testing.expect(has(try listing(&s, "Jumplist"), "(closed)"));
- // Every entry in order (JumpScope all): which file has the focus after
- // a Del is the layout's to choose, and Back keeps to it first.
- try s.write("/ctl", "JumpScope all\n");
- for (0..8) |_| {
- if ((try named(&s, "/a.txt")).len > 0) break;
- try s.write("/exec", "Back\n");
- }
+ // The text pane closed too, the keyboard is the +Jumps listing's,
+ // which has no file to keep to: Back takes the nearest place, the
+ // closed a.txt's.
+ try s.write(s.at("/pane/{d}/ctl", .{(try named(&s, "/test.txt"))[0]}), "Del\n");
+ try s.write("/exec", "Back\n");
try s.expect(s.at("/pane/{d}/name", .{try s.focused()}), s.at("{s}\n", .{a}));
}