diff options
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); |
