mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-14 19:45:49 +00:00
Skip tests if font family doesn't match
This commit is contained in:
@@ -2122,6 +2122,15 @@ fn testShaperWithDiscoveredFont(alloc: Allocator, font_req: [:0]const u8) !TestS
|
||||
defer disco_it.deinit();
|
||||
var face: font.DeferredFace = (try disco_it.next()) orelse return error.FontNotFound;
|
||||
errdefer face.deinit();
|
||||
|
||||
// Check which font was discovered - skip if it doesn't match the request
|
||||
var name_buf: [256]u8 = undefined;
|
||||
const face_name = face.name(&name_buf) catch "(unknown)";
|
||||
if (std.mem.indexOf(u8, face_name, font_req) == null) {
|
||||
face.deinit();
|
||||
return error.SkipZigTest;
|
||||
}
|
||||
|
||||
_ = try c.add(
|
||||
alloc,
|
||||
try face.load(lib, .{ .size = .{ .points = 12 } }),
|
||||
|
||||
Reference in New Issue
Block a user