summaryrefslogtreecommitdiff
path: root/test/panes.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/panes.zig')
-rw-r--r--test/panes.zig15
1 files changed, 8 insertions, 7 deletions
diff --git a/test/panes.zig b/test/panes.zig
index 5562105e..04769ccf 100644
--- a/test/panes.zig
+++ b/test/panes.zig
@@ -993,7 +993,7 @@ test "terminal output keeps following new rows after scrollback eviction" {
const pane = p.panes[0].?;
pane.body.mode = .tty;
pane.tty_filter = false;
- const pages = &pane.terminal.?.vt.screens.active.pages;
+ const pages = &pardes.Term.emulatorOf(pane.terminal.?).vt.screens.active.pages;
pages.limits.set(.bytes, 64 * 1024);
var frame = std.heap.ArenaAllocator.init(gpa);
defer frame.deinit();
@@ -1049,7 +1049,7 @@ test "terminal edit stays on its surviving row when old scrollback is evicted" {
while (p.nextEffect()) |_| {}
const pane = p.panes[0].?;
pane.body.mode = .tty;
- const pages = &pane.terminal.?.vt.screens.active.pages;
+ const pages = &pardes.Term.emulatorOf(pane.terminal.?).vt.screens.active.pages;
pages.limits.set(.bytes, 64 * 1024);
var next: usize = 0;
while (next < 3000) {
@@ -1101,7 +1101,7 @@ test "terminal edits and undo survive partial history clearing and whole-screen
if (action == .reset_alternate)
p.update(.{ .output = .{ .pane = 0, .bytes = "\x1b[?1049h" } });
p.update(.{ .output = .{ .pane = 0, .bytes = std.mem.asBytes(&@as([40][9]u8, @splat("old row\r\n".*))) } });
- const pages = &pane.terminal.?.vt.screens.active.pages;
+ const pages = &pardes.Term.emulatorOf(pane.terminal.?).vt.screens.active.pages;
pages.limits.set(.bytes, 64 * 1024);
const row: i32 = @as(i32, @intCast(pages.total_rows - pane.rows)) +
@as(i32, if (action == .partial_clear_history) -1 else 2);
@@ -1152,7 +1152,7 @@ test "terminal edits and undo survive partial history clearing and whole-screen
try std.testing.expectEqual(expected + 1, snapshot.cur_row);
try std.testing.expectEqualStrings("edit one\nedit two", snapshot.ovl.?.text);
}
- try std.testing.expectEqual(@as(usize, 2), pane.terminal.?.vt.screens.active.pages.countTrackedPins());
+ try std.testing.expectEqual(@as(usize, 2), pardes.Term.emulatorOf(pane.terminal.?).vt.screens.active.pages.countTrackedPins());
try pardes.edit.undoStep(p, &pane.body, true);
try std.testing.expectEqualStrings("edit one\nedit two", pane.ovl.?.text);
try std.testing.expectEqual(expected, pane.ovl.?.row);
@@ -1192,7 +1192,7 @@ test "terminal eviction and lower-region scrolling in one read preserve a surviv
while (p.nextEffect()) |_| {}
const pane = p.panes[0].?;
pane.body.mode = .tty;
- const pages = &pane.terminal.?.vt.screens.active.pages;
+ const pages = &pardes.Term.emulatorOf(pane.terminal.?).vt.screens.active.pages;
pages.limits.set(.bytes, 64 * 1024);
var next: usize = 0;
while (next < 3000) {
@@ -1548,8 +1548,8 @@ test "unplaced terminal panes keep their allocated grid until placement" {
try std.testing.expectEqual(pardes.Rect{}, p.view().rects[id]);
try std.testing.expectEqual(@as(u16, 100), pane.cols);
try std.testing.expectEqual(@as(u16, 30), pane.rows);
- try std.testing.expectEqual(pane.cols, pane.terminal.?.vt.cols);
- try std.testing.expectEqual(pane.rows, pane.terminal.?.vt.rows);
+ try std.testing.expectEqual(pane.cols, pardes.Term.emulatorOf(pane.terminal.?).vt.cols);
+ try std.testing.expectEqual(pane.rows, pardes.Term.emulatorOf(pane.terminal.?).vt.rows);
while (p.nextEffect()) |effect| {
if (effect == .resize_pty and effect.resize_pty.pane == id) return error.ResizedUnplacedPane;
}
@@ -3501,6 +3501,7 @@ const TerminalTests = struct {
};
test {
+ _ = @import("terminal.zig");
_ = TagLayerTests;
_ = TagNameTintTests;
_ = TreeContextTests;