summaryrefslogtreecommitdiff
path: root/test/panes.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/panes.zig')
-rw-r--r--test/panes.zig12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/panes.zig b/test/panes.zig
index a391dba2..b9fa9a88 100644
--- a/test/panes.zig
+++ b/test/panes.zig
@@ -152,8 +152,8 @@ const TagLayerTests = struct {
try std.testing.expect(left.sel[0].state == .done and left.sel[0].r0 == 0);
p.update(.{ .key = .{ .cp = Key.escape } });
const long = "a" ** 60 ++ "界END";
- try std.testing.expect(p.global_tag.set(long));
- for (p.col_tags[0..p.ncol]) |*tag| try std.testing.expect(tag.set(long));
+ p.global_tag.own = try p.gpa.dupe(u8, long);
+ for (p.col_tags[0..p.ncol]) |*tag| tag.own = try p.gpa.dupe(u8, long);
_ = try p.render(frame.allocator());
for ([_]Kind{ .workspace, .column }) |kind| {
const id: usize = if (kind == .column) 1 else 0;
@@ -161,7 +161,7 @@ const TagLayerTests = struct {
const x = @as(f32, @floatFromInt(header.viewport.x)) * 10 + 62.5 * 5;
p.update(.{ .mouse = mouse(header, x, .press) });
p.update(.{ .mouse = mouse(header, x, .release) });
- try std.testing.expectEqual(@as(?u16, 63), p.topbar_col);
+ try std.testing.expectEqual(@as(i32, 63), p.focusedHeader().?.cur_col);
if (kind == .column) try std.testing.expectEqual(@as(?usize, 1), p.header_column) else try std.testing.expect(p.header_column == null);
p.update(.{ .key = .{ .cp = Key.escape } });
}
@@ -334,7 +334,7 @@ const TagNavigationTests = struct {
key(p, 'j');
try std.testing.expectEqual(@as(i32, 0), pane.tag.cur_col);
try std.testing.expectEqual(@as(usize, 0), p.active);
- try std.testing.expect(pane.focus == .tag and p.topbar_col == null);
+ try std.testing.expect(pane.focus == .tag and !p.header_focus);
window(p, 'l');
try std.testing.expectEqual(right, p.active);
try std.testing.expect(pane.focus == .body and p.panes[right].?.focus == .body);
@@ -1291,13 +1291,13 @@ test "leaving a pane or entering a header cancels an uncommitted filename" {
const pane = try p.setTestFile("untouched\n");
for ([_]bool{ false, true }) |header| {
p.active = 0;
- p.topbar_col = null;
+ p.exitHeader();
p.update(.tick);
clickPathEnd(p, pane);
p.update(.{ .paste = "/draft" });
try std.testing.expect(pane.prompt == .name);
if (header) {
- p.topbar_col = 0;
+ p.enterHeader(null);
p.update(.tick);
} else {
try std.testing.expect(p.executeBuiltinLine(0, "New"));