summaryrefslogtreecommitdiff
path: root/test/panes.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/panes.zig')
-rw-r--r--test/panes.zig23
1 files changed, 11 insertions, 12 deletions
diff --git a/test/panes.zig b/test/panes.zig
index 497fe884..063832f3 100644
--- a/test/panes.zig
+++ b/test/panes.zig
@@ -787,13 +787,12 @@ const TagNameTintTests = struct {
fn configure(p: *Pardes) void {
var theme = p.theme().*;
- theme.tag_name_fg = name_fg;
- theme.tag_active_name_fg = null;
- theme.tag_fg = tag_fg;
+ theme.tag_name = name_fg;
+ theme.tag_text = tag_fg;
// The focused tag's ink is the plain one, as an unfocused tag's.
- theme.tag_active_fg = null;
+ theme.tag_focus_text = null;
p.custom_theme = theme;
- p.theme_chrome = pardes.ChromeTheme.fromTheme(p.theme());
+ p.theme_chrome = .of(p.theme());
}
fn check(p: *Pardes, id: usize, name: []const u8) !usize {
@@ -890,10 +889,10 @@ const TagNameTintTests = struct {
pane.file.?.path = try p.gpa.dupe(u8, "/dir/file.zig");
configure(p);
defer p.custom_theme = null;
- p.custom_theme.?.tag_name_fg = null;
+ p.custom_theme.?.tag_name = null;
const active_fg = [3]u8{ 175, 183, 194 };
- p.custom_theme.?.tag_active_fg = active_fg;
- p.theme_chrome = pardes.ChromeTheme.fromTheme(p.theme());
+ p.custom_theme.?.tag_focus_text = active_fg;
+ p.theme_chrome = .of(p.theme());
var arena = std.heap.ArenaAllocator.init(p.gpa);
defer arena.deinit();
const surface = try p.render(arena.allocator());
@@ -987,7 +986,7 @@ test "terminal overlay recoloring never materializes unrelated history" {
const body_y = bodyY(p, rect);
const cell = surface.at(rect.x + config.GUTTER, body_y);
try testing.expectEqualStrings("c", cell.grapheme());
- try testing.expectEqual(pardes.Color{ .rgb = p.theme().palette.?[2] }, cell.style.fg);
+ try testing.expectEqual(pardes.Color{ .rgb = p.theme().ansi.?[2] }, cell.style.fg);
}
test "terminal output keeps following new rows after scrollback eviction" {
@@ -1035,7 +1034,7 @@ test "terminal output keeps following new rows after scrollback eviction" {
for (last, 0..) |byte, col| {
const cell = surface.at(x + @as(u16, @intCast(col)), y);
try std.testing.expectEqualStrings(&.{byte}, cell.grapheme());
- try std.testing.expectEqual(pardes.Color{ .rgb = p.theme().palette.?[2] }, cell.style.fg);
+ try std.testing.expectEqual(pardes.Color{ .rgb = p.theme().ansi.?[2] }, cell.style.fg);
}
while (p.nextEffect()) |_| {}
p.update(.{ .key = .{ .cp = 'f', .text = "f" } });
@@ -3608,7 +3607,7 @@ test "Zig keywords keep every rendered byte colored across line-number widths" {
try std.testing.expectEqual(@as(u16, @intCast(y)), surface.cursor.?.y);
} else if_position = .{ .x = @intCast(x), .y = @intCast(y) };
for ([_]*pardes.Cell{ first, second }) |cell| {
- const expected: pardes.Color = .{ .rgb = p.theme().kw };
+ const expected: pardes.Color = .{ .rgb = p.theme().keyword };
if (!std.meta.eql(expected, cell.style.fg)) std.debug.print(
"\nline={d} wrap={} horizontal={d} sample={s} cell={s}\n",
.{ line, view.wrap, view.horizontal, sample, cell.grapheme() },
@@ -3644,7 +3643,7 @@ test "terminal overlays preserve trailing blank styles without coloring inserted
const rect = p.view().rects[0];
const x = rect.x + config.GUTTER;
const y = bodyY(p, rect);
- const palette = p.theme().palette.?;
+ const palette = p.theme().ansi.?;
const colors = [_]pardes.Color{ .{ .rgb = palette[1] }, .{ .rgb = palette[2] }, .{ .rgb = palette[4] } };
const original = try p.render(frame.allocator());
for (colors, 0..) |color, row| {