From 6858646843d91e3c3e5de55c7c649dd26b4f79de Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 30 Apr 2024 11:55:18 -0700 Subject: [PATCH] font/coretext: tests for #1721 --- src/font/shaper/coretext.zig | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/font/shaper/coretext.zig b/src/font/shaper/coretext.zig index c83d07533..de06cea61 100644 --- a/src/font/shaper/coretext.zig +++ b/src/font/shaper/coretext.zig @@ -526,12 +526,7 @@ test "run iterator: empty cells with background set" { { const run = (try it.next(alloc)).?; const cells = try shaper.shape(run); - try testing.expectEqual(@as(usize, 1), cells.len); - } - { - const run = (try it.next(alloc)).?; - const cells = try shaper.shape(run); - try testing.expectEqual(@as(usize, 2), cells.len); + try testing.expectEqual(@as(usize, 3), cells.len); } try testing.expect(try it.next(alloc) == null); } @@ -1419,7 +1414,7 @@ test "shape cell attribute change" { try testing.expectEqual(@as(usize, 2), count); } - // Changing bg color should split + // Changing bg color should NOT split { var screen = try terminal.Screen.init(alloc, 3, 10, 0); defer screen.deinit(); @@ -1441,7 +1436,7 @@ test "shape cell attribute change" { count += 1; _ = try shaper.shape(run); } - try testing.expectEqual(@as(usize, 2), count); + try testing.expectEqual(@as(usize, 1), count); } // Same bg color should not split