summaryrefslogtreecommitdiff
path: root/test/image_harness.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/image_harness.zig')
-rw-r--r--test/image_harness.zig18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/image_harness.zig b/test/image_harness.zig
index f8cdf218..f51839ae 100644
--- a/test/image_harness.zig
+++ b/test/image_harness.zig
@@ -222,7 +222,7 @@ fn runKittyPdf(arena: std.mem.Allocator, exe: [:0]const u8, base: [:0]const u8)
try h.expectRawContains("\x1b_Gi=1,a=q\x1b\\", "app did not issue the Kitty graphics capability query");
try h.send("\x1b_Gi=1;OK\x1b\\\x1b[?1;2c\x1b[A");
- const transmit = "\x1b_Gf=32,s=144,v=96,i=";
+ const transmit = "\x1b_Gf=32,s=96,v=64,i=";
const first_deadline = eh.nowMs() + 5000;
while (eh.nowMs() < first_deadline) {
_ = try h.pumpOnce(50);
@@ -230,7 +230,7 @@ fn runKittyPdf(arena: std.mem.Allocator, exe: [:0]const u8, base: [:0]const u8)
const placed = std.mem.indexOf(u8, h.raw.items, "\x1b_Ga=p,i=") != null;
if (sent and placed and h.contains("pdf 1/4 width PdfFit")) break;
}
- try h.expectRawContains(transmit, "first PDF page was not transmitted as 144x96 RGBA");
+ try h.expectRawContains(transmit, "first PDF page was not transmitted as the 96x64 Kitty raster");
try h.expectRawContains("\x1b_Ga=p,i=", "first PDF page was not placed in the pane body");
try h.expectContains("pdf 1/4 width PdfFit", "PDF pane did not expose its initial width fit");
@@ -240,14 +240,14 @@ fn runKittyPdf(arena: std.mem.Allocator, exe: [:0]const u8, base: [:0]const u8)
// the full source is retained and vertically letterboxed by a pixel offset.
const width_apc = kittyPlacementApc(h.raw.items, 0) orelse return error.KittyPdfWidthPlacementMissing;
if (kittyParam(width_apc, 'x') != 0 or kittyParam(width_apc, 'y') != 0 or
- kittyParam(width_apc, 'w') != 144)
+ kittyParam(width_apc, 'w') != 96)
{
std.debug.print("unexpected Kitty fit-width placement: {s}\n", .{width_apc});
return error.KittyPdfWidthCropWrong;
}
const source_h = kittyParam(width_apc, 'h') orelse return error.KittyPdfWidthCropMissing;
const pixel_y = kittyParam(width_apc, 'Y') orelse return error.KittyPdfWidthLetterboxMissing;
- if (source_h != 96 or pixel_y == 0 or kittyParam(width_apc, 'c') == null) {
+ if (source_h != 64 or pixel_y == 0 or kittyParam(width_apc, 'c') == null) {
std.debug.print("unexpected Kitty fit-width letterbox: {s}\n", .{width_apc});
return error.KittyPdfWidthLetterboxWrong;
}
@@ -281,7 +281,7 @@ fn runKittyPdf(arena: std.mem.Allocator, exe: [:0]const u8, base: [:0]const u8)
return error.KittyPdfHeightPlacementMissing;
const height_crop_w = kittyParam(height_apc, 'w') orelse return error.KittyPdfHeightPlacementWrong;
if (kittyParam(height_apc, 'x') != 0 or kittyParam(height_apc, 'y') != 0 or
- height_crop_w == 0 or height_crop_w >= 144 or kittyParam(height_apc, 'h') != 96 or
+ height_crop_w == 0 or height_crop_w >= 96 or kittyParam(height_apc, 'h') != 64 or
kittyParam(height_apc, 'r') == null)
return error.KittyPdfHeightPlacementWrong;
if (std.mem.count(u8, h.raw.items, transmit) != transmit_before_fit)
@@ -322,13 +322,13 @@ fn runKittyPdf(arena: std.mem.Allocator, exe: [:0]const u8, base: [:0]const u8)
// TTY shell may drain those presses in one input batch, but every native
// PDF page transition must be rastered before the next press consumes the
// new page's geometry. Distinct page heights make that ordering observable
- // in the actual Kitty transmit headers: page 2 is 144x96, page 3 144x100,
- // and page 4 144x104. This is also a direct one-detent check before the
+ // in the actual Kitty transmit headers: page 2 is 96x64, page 3 96x67,
+ // and page 4 96x69. This is also a direct one-detent check before the
// burst and a direction-reversal check after it.
const wheel_up = try std.fmt.allocPrint(arena, "\x1b[<64;{d};{d}M", .{ mouse_col + 1, mouse_row + 1 });
const wheel_down = try std.fmt.allocPrint(arena, "\x1b[<65;{d};{d}M", .{ mouse_col + 1, mouse_row + 1 });
- const page_three_transmit = "\x1b_Gf=32,s=144,v=100,i=";
- const page_four_transmit = "\x1b_Gf=32,s=144,v=104,i=";
+ const page_three_transmit = "\x1b_Gf=32,s=96,v=67,i=";
+ const page_four_transmit = "\x1b_Gf=32,s=96,v=69,i=";
try h.send(wheel_up);
try h.expectWaitFor("pdf 1/4 height PdfFit", 5000, "wheel-up did not return to PDF page one");