summaryrefslogtreecommitdiff
path: root/test/terminal.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-22 20:21:32 -0300
committerGabriel Schneider <[email protected]>2026-11-22 20:21:32 -0300
commit3f250d0f963f375d699f11ffc02b07f2e2cbbbee (patch)
tree4e5a1f577fd3dd247f3643d979868347524ce703 /test/terminal.zig
parent34e2d82a322bd3767a8ec62b3a4c0894399e8c04 (diff)
parentc607dc14502a6956bdfa3575bc7363514a7abeb4 (diff)
downloadpardes-3f250d0f963f375d699f11ffc02b07f2e2cbbbee.tar.gz
pardes-3f250d0f963f375d699f11ffc02b07f2e2cbbbee.zip
integration (a base for the terminals' next round, not yet the gathered line): the viewport in the view and the patches in the semantics hash on merge58 with the terminal put back: pardes-raw-tty (`muwnrqro`, on pardes-merge58: a TERM that reaches a session while it leaves its terminal no longer leaves it raw: `Killed.disarm` puts the cooked modes back itself, `leave` calls it last) and pardes-term-join-10's two changes (`xktusoyq` on `qtxssxyk`, on pardes-term-join-9: where a view stands in a terminal's history is the view's (`Pane.scrolled_to`), carried once a confirmed write that moves rows, the wire at 31; build/patches hashed into a replica's semantics); no conflict; core-test 917/1077 (160 skipped), shell-test 1119/1122, pane-test 182/183, term-test 16/16; NOT gated whole: the viewport's gate had one perf count over its budget ("terminal on all" +0.235%), which the next round brings down before this is the gathered line (2026-11-22)
Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'test/terminal.zig')
-rw-r--r--test/terminal.zig6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/terminal.zig b/test/terminal.zig
index 7e7106a1..bad70081 100644
--- a/test/terminal.zig
+++ b/test/terminal.zig
@@ -25,7 +25,6 @@ const close = Term.close;
const grid = Term.grid;
const modes = Term.modes;
const prompt = Term.prompt;
-const scroll = Term.scroll;
const scrollback = Term.scrollback;
const commandOutput = Term.commandOutput;
const filterOf = emu.filterOf;
@@ -110,7 +109,7 @@ test "document construction allocates only the pane and has inert terminal defau
try std.testing.expectEqual(Term.Prompt{}, prompt(pane.terminal));
pane.scrollBy(100);
pane.followOutput();
- pane.resizeGrid(80, 24);
+ pane.resizeGrid(0, 80, 24);
try std.testing.expectEqual(Term.Grid{}, grid(pane.terminal));
try std.testing.expectEqualStrings("", try scrollback(pane.terminal, allocator));
try std.testing.expect(!failing.has_induced_failure);
@@ -139,7 +138,7 @@ test "terminal state keeps parser fragments and sends emulator replies through i
try std.testing.expectEqual(@as(u16, 0), state.reply_len);
}
-test "a terminal's dump restores the cells it drew, its history and where its view was" {
+test "a terminal's dump restores the cells it drew and its history (where a view stands is the view's, dumped with its pane)" {
const gpa = std.testing.allocator;
const p = try Pardes.init(gpa, .{ .tty_only = true, .cols = 40, .rows = 12 });
defer p.deinit();
@@ -150,7 +149,6 @@ test "a terminal's dump restores the cells it drew, its history and where its vi
var line: [16]u8 = undefined;
pane.feedOutput(p, std.fmt.bufPrint(&line, "line {d}\r\n", .{i}) catch unreachable);
}
- scroll(pane.terminal.?, -5);
const bytes = try pardes.walk.save(State, gpa, pane.terminal.?);
defer gpa.free(bytes);
var arena: std.heap.ArenaAllocator = .init(gpa);