diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-05 22:40:49 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-05 23:58:31 -0300 |
| commit | dfcc040ac979b695dc2e68b9d866c2769ba6d928 (patch) | |
| tree | cd88c998b46f758a7c74e3d800312d968d6303ac /test/panes.zig | |
| parent | f930d53c58187381b2f0df6892546ac1c217c9db (diff) | |
| download | pardes-dfcc040ac979b695dc2e68b9d866c2769ba6d928.tar.gz pardes-dfcc040ac979b695dc2e68b9d866c2769ba6d928.zip | |
settings #2, five presentation variants go, each now the style it had by default: Colors (text panes and terminals coloured, with SPC t c), TreeContextTagStyle (TreeContext rows in the tag's style), FocusTint (the focused tags tinted), SyntaxBold (keywords not bold) and Ligatures (the window shapes them; gui.zig's syncLigatures and the words' ligatures flag go, and Capabilities.ligatures); the reads deleted are in File.zig, body_layer.zig, Tables.zig, exec.zig's applySettingBuiltin, Core.zig (SessionView.layered left at its default), draw.zig, surface.zig's comment and gui.zig; deleted tests: "settings: Colors off draws a source plain, and on again colours its keywords", "Ligatures is a setting only in the shell that shapes text" and "Ligatures off draws a ligature as its cells' own glyphs, and on shapes it again", and the toggled half of TreeContext's Core test; rewritten through what stays: SyntaxBold's every-row test as keywords coloured in every row, the tag-click tests on JumpTrail, the tag-name tint tests with the focused tag's ink plain, Core's tab test by the keyword's ink; golden changes, each the cut's: syntax, theme, mini and ninep lose their Colors toggles and frames (the message row after them names the builtin before, Mini), and leader, ttyhelp and builtins' Help listing is four columns narrower, TreeContextTagStyle having been its longest word; perf.zig's harness id moves again; the window scenes from 09 on take new gui-goldens lines, the scene no longer writing FocusTint on and its word gone from the message row (the base window build running the same scenes gives the same frames); gates on tui: core-test 965/965, behaviour-test 242/242, unit-test 1482/1483, pane-test 171/172, snap all 105 scripts ok, process-test 0 of 37 failed; gui unit-test 1526/1527, gui-golden 0 of 1 failed
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'test/panes.zig')
| -rw-r--r-- | test/panes.zig | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/test/panes.zig b/test/panes.zig index 45302b6f..a6b6aecd 100644 --- a/test/panes.zig +++ b/test/panes.zig @@ -376,7 +376,6 @@ const TreeContextTests = struct { pane.tag_expanded = false; // a one-row tag keeps this small screen's rows p.sync(); p.settings.wrap = false; - p.settings.colors = false; try std.testing.expect(p.executeBuiltinLine(0, "TreeContext")); pane.scrollBy(8); pane.hscroll = 4; @@ -794,9 +793,10 @@ const TagNameTintTests = struct { theme.tag_name_fg = name_fg; theme.tag_active_name_fg = null; theme.tag_fg = tag_fg; + // The focused tag's ink is the plain one, as an unfocused tag's. + theme.tag_active_fg = null; p.custom_theme = theme; p.chrome = pardes.ChromeTheme.fromTheme(p.theme()); - p.settings.focus_tint = false; } fn check(p: *Pardes, id: usize, name: []const u8) !usize { @@ -892,19 +892,16 @@ const TagNameTintTests = struct { p.chrome = pardes.ChromeTheme.fromTheme(p.theme()); var arena = std.heap.ArenaAllocator.init(p.gpa); defer arena.deinit(); - for ([_]bool{ false, true }) |active| { - p.settings.focus_tint = active; - const surface = try p.render(arena.allocator()); - const x = p.rects[0].x + pardes.TAG_TEXT_INSET; - const y = tagY(p, p.rects[0]); - const fg = if (active) active_fg else tag_fg; - // The directory in the ink; the name tinted, never in it. - const chrome = p.chromeTheme(); - const tint = if (active) chrome.tag_active_name_fg else chrome.tag_name_fg; - try std.testing.expect(!std.meta.eql(tint, fg)); - try std.testing.expectEqual(pardes.Color{ .rgb = fg }, surface.at(x + 1, y).style.fg); - try std.testing.expectEqual(pardes.Color{ .rgb = tint }, surface.at(x + 5, y).style.fg); - } + const surface = try p.render(arena.allocator()); + const x = p.rects[0].x + pardes.TAG_TEXT_INSET; + const y = tagY(p, p.rects[0]); + const fg = active_fg; + // The directory in the ink; the name tinted, never in it. + const chrome = p.chromeTheme(); + const tint = chrome.tag_active_name_fg; + try std.testing.expect(!std.meta.eql(tint, fg)); + try std.testing.expectEqual(pardes.Color{ .rgb = fg }, surface.at(x + 1, y).style.fg); + try std.testing.expectEqual(pardes.Color{ .rgb = tint }, surface.at(x + 5, y).style.fg); } }; @@ -3653,7 +3650,6 @@ test "Zig keywords keep every rendered byte colored across line-number widths" { pane.body.cur_row = @intCast(line - 1); pane.body.cur_col = @intCast(std.mem.indexOf(u8, sample, "fn").?); pane.hscroll = view.horizontal; - p.settings.colors = true; p.settings.wrap = view.wrap; p.sync(); var frame = std.heap.ArenaAllocator.init(gpa); |
