diff options
Diffstat (limited to 'test/kitty.zig')
| -rw-r--r-- | test/kitty.zig | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/test/kitty.zig b/test/kitty.zig index 4341677e..760d22be 100644 --- a/test/kitty.zig +++ b/test/kitty.zig @@ -19,7 +19,6 @@ const std = @import("std"); const pardes = @import("pardes"); const Pardes = pardes.Pardes; const config = pardes.config; -const terminal = pardes.panes.terminal; const gpa = std.testing.allocator; @@ -309,7 +308,7 @@ test "kitty: text around an APC prints, in the same read and split across reads" var r = try Rig.init(1); defer r.deinit(); r.feedSplit(0, "before" ++ apc("a=t,i=3,f=24,s=4,v=2,q=2", rgb_b64) ++ "after", step); - const text = try terminal.screenTextAlloc(r.pane(0), r.frame.allocator()); + const text = try pardes.Term.scrollback(r.pane(0).terminal, r.frame.allocator()); try std.testing.expect(std.mem.indexOf(u8, text, "beforeafter") != null); try std.testing.expect(r.hasImage(0, 3)); } @@ -643,7 +642,7 @@ test "kitty: an image follows its text when the shell scrolls, resizes and reflo // A narrower pane reflows the text; the image stays on its row. const pane = r.pane(0); pane.resizeGrid(40, pane.rows); - const text = try terminal.screenTextAlloc(pane, r.frame.allocator()); + const text = try pardes.Term.scrollback(pane.terminal, r.frame.allocator()); var row: usize = 0; var lines = std.mem.splitScalar(u8, text, '\n'); while (lines.next()) |line| : (row += 1) if (std.mem.startsWith(u8, line, "marker")) break; @@ -762,7 +761,7 @@ test "kitty: a cancelled (CAN, SUB) APC runs nothing, answers nothing, and the t r.feed(0, "after"); try std.testing.expect(!r.hasImage(0, 60)); try std.testing.expectEqualStrings("", try r.take(0)); - const text = try terminal.screenTextAlloc(r.pane(0), r.frame.allocator()); + const text = try pardes.Term.scrollback(r.pane(0).terminal, r.frame.allocator()); try std.testing.expect(std.mem.indexOf(u8, text, "after") != null); } } |
