test(utils): handle IoctlFailed error using default values
This commit is contained in:
1 parent
989b5b2305
commit
6317269c4f
1 file changed
+1
-1
+1
-1
@@ -43,7 +43,7 @@ pub fn getTerminalSize() !TermSize {
|
||||
}
|
||||
|
||||
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 });
|
||||
|
||||
|
||||
Reference in new issue
Block a user