summaryrefslogtreecommitdiff
path: root/test/terminal.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-23 02:23:34 -0300
committerGabriel Schneider <[email protected]>2026-11-23 02:23:34 -0300
commit1ebae0db0a185455b2a03f22f5106113c6407a2f (patch)
treedb0e473c2c060e6bf7d4f4d169ffff11178056c3 /test/terminal.zig
parent5393ce743d7848d26e60fd7d4d27a4119272df9f (diff)
parentde0e85daa8ad0bf9618734e16568823aa2b61a54 (diff)
downloadpardes-1ebae0db0a185455b2a03f22f5106113c6407a2f.tar.gz
pardes-1ebae0db0a185455b2a03f22f5106113c6407a2f.zip
integration (a base for the next rounds, not yet the gathered line): the one decision on the tree to install: pardes-merge60 (`krovvoum`: the viewport, a client's way back at an Upgrade, the pair's round 12, the lanes on the glide; in its whole gate) and pardes-one-decision (`ltvyvwru` on `wllwukuk` on `trmpwtso`, on pardes-viewport: one count of an emulator's writes in the core (`Pardes.outside`), copied, digested and dumped, which `Replica.confirm` reads once a unit where four spread checks stood; the rollback copy walks every type unless it declares `outside_copy`: the Changes layer's heap was not walked and was freed twice); no conflict; core-test 919/1083 (164 skipped), shell-test 1125/1128 (2026-11-23)
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.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/terminal.zig b/test/terminal.zig
index bad70081..03bcd294 100644
--- a/test/terminal.zig
+++ b/test/terminal.zig
@@ -82,9 +82,10 @@ fn lineBreaks(comptime n: usize) [2 * n]u8 {
test "replay ownership is terminal-only and construction rolls back on allocation failure" {
const Case = struct {
fn run(gpa: std.mem.Allocator, terminal: bool) !void {
- const pane = if (terminal) try panes.createTerminal(gpa, 40, 12) else try panes.createDoc(gpa, 40, 12);
+ var outside: Term.Outside = .{};
+ const pane = if (terminal) try panes.createTerminal(&outside, gpa, 40, 12) else try panes.createDoc(gpa, 40, 12);
defer gpa.destroy(pane);
- defer if (pane.terminal) |state| close(state, gpa);
+ defer if (pane.terminal) |state| close(&outside, state);
try std.testing.expectEqual(terminal, pane.terminal != null);
}
};
@@ -98,7 +99,6 @@ test "document construction allocates only the pane and has inert terminal defau
const allocator = failing.allocator();
const pane = try panes.createDoc(allocator, 40, 12);
defer allocator.destroy(pane);
- defer if (pane.terminal) |state| close(state, allocator);
try std.testing.expect(pane.terminal == null);
try std.testing.expectEqual(@as(usize, 1), failing.alloc_index);
try std.testing.expectEqual(@as(usize, 0), failing.resize_index);
@@ -109,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(0, 80, 24);
+ pane.resizeGrid(undefined, 80, 24); // no terminal: the core is never read
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);