summaryrefslogtreecommitdiff
path: root/test/behaviour
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
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')
-rw-r--r--test/behaviour/modes.zig13
-rw-r--r--test/behaviour/other_files.zig14
-rw-r--r--test/behaviour/settings.zig9
3 files changed, 8 insertions, 28 deletions
diff --git a/test/behaviour/modes.zig b/test/behaviour/modes.zig
index ef39d912..e615920d 100644
--- a/test/behaviour/modes.zig
+++ b/test/behaviour/modes.zig
@@ -345,10 +345,9 @@ const Jumps = struct {
}
};
-test "modes: Ctrl-o keeps to the focused file (JumpScope file), A41 then A1, and leaves it only once it runs out that way; Ctrl-i mirrors it" {
+test "modes: Ctrl-o keeps to the focused file, A41 then A1, and leaves it only once it runs out that way; Ctrl-i mirrors it" {
var t = try Jumps.init("BABABA");
defer t.s.deinit();
- try std.testing.expect(std.mem.indexOf(u8, try t.s.read("/ctl"), "\nJumpScope file\n") != null);
// B81, B41 passed over, kept in their places: A has nothing older than
// A1, so the step after it is the nearest place of any file, B1.
try std.testing.expectEqualStrings("A41 A1 B1", try t.walk(.key, true));
@@ -372,16 +371,6 @@ test "modes: Ctrl-i retraces a run of Ctrl-o inside one file step for step, back
try std.testing.expectEqualStrings("A41 A1", try t.walk(.key, true));
}
-test "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" {
- var t = try Jumps.init("ABABA");
- defer t.s.deinit();
- try t.s.write("/ctl", "JumpScope all\n");
- try std.testing.expectEqualStrings("B41 A41 B1 A1", try t.walk(.key, true));
- try std.testing.expectEqualStrings("B1 A41 B41 A81", try t.walk(.key, false));
- try t.s.write("/ctl", "JumpScope\n");
- try std.testing.expect(std.mem.indexOf(u8, try t.s.read("/ctl"), "\nJumpScope file\n") != null);
-}
-
test "modes: from a pane with no file, Ctrl-o and Ctrl-i step through every place" {
var t = try Jumps.init("OAOBO");
defer t.s.deinit();
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}));
}
diff --git a/test/behaviour/settings.zig b/test/behaviour/settings.zig
index 113a423b..25a3bc04 100644
--- a/test/behaviour/settings.zig
+++ b/test/behaviour/settings.zig
@@ -123,7 +123,7 @@ test "settings: a setting this frontend cannot show says GUI-only, never run as
try std.testing.expect(has(try s.read("/ctl"), "\nDumpDir /"));
}
-test "settings: Back and Forward written to exec keep to the focused file, and JumpScope all, written to ctl, takes every place in order" {
+test "settings: Back and Forward written to exec keep to the focused file" {
var tmp = std.testing.tmpDir(.{});
defer tmp.cleanup();
try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "a.txt", .data = std.mem.asBytes(&@as([100][4]u8, @splat("row\n".*))) });
@@ -156,13 +156,6 @@ test "settings: Back and Forward written to exec keep to the focused file, and J
.{ "Forward", "/b.txt", 80 },
.{ "Forward", "/a.txt", 80 },
});
- try s.write("/ctl", "JumpScope all\n");
- try std.testing.expect(has(try s.read("/ctl"), "JumpScope all\n"));
- try walk(&s, &.{
- .{ "Back", "/b.txt", 80 },
- .{ "Back", "/a.txt", 40 },
- .{ "Forward", "/b.txt", 80 },
- });
}
const syntax = @import("pardes_config").syntax_highlighting;