terminal/search: fix tests

This commit is contained in:
Mitchell Hashimoto
2026-07-26 20:27:30 -07:00
parent 1092204df1
commit 659a60ae53

View File

@@ -487,7 +487,11 @@ test "feed with pruned page" {
const alloc = testing.allocator;
// Zero here forces minimum max size to effectively two pages.
var p: PageList = try .init(alloc, 80, 24, 0);
var p: PageList = try .init(alloc, .{
.cols = 80,
.rows = 24,
.max_size = 0,
});
defer p.deinit();
// Grow to capacity
@@ -530,7 +534,10 @@ test "feed with pruned page" {
test "feed keeps its tracked pin within a shorter page" {
const alloc = testing.allocator;
var pages: PageList = try .init(alloc, 10, 2, null);
var pages: PageList = try .init(alloc, .{
.cols = 10,
.rows = 2,
});
defer pages.deinit();
const first = pages.pages.first.?;