this repo has no description
13
fork

Configure Feed

Select the types of activity you want to include in your feed.

test: test Screen, skip TestTty on windows

+14 -6
-1
src/Loop.zig
··· 316 316 } 317 317 318 318 test Loop { 319 - if (builtin.os.tag == .windows) return; 320 319 const Event = union(enum) { 321 320 key_press: vaxis.Key, 322 321 winsize: vaxis.Winsize,
+4
src/Screen.zig
··· 76 76 assert(i < self.buf.len); 77 77 return self.buf[i]; 78 78 } 79 + 80 + test "refAllDecls" { 81 + std.testing.refAllDecls(@This()); 82 + }
+10 -5
src/tty.zig
··· 14 14 const Winsize = vaxis.Winsize; 15 15 16 16 /// The target TTY implementation 17 - pub const Tty = switch (builtin.os.tag) { 17 + pub const Tty = if (builtin.is_test) 18 + TestTty 19 + else switch (builtin.os.tag) { 18 20 .windows => WindowsTty, 19 - else => if (builtin.is_test) 20 - TestTty 21 - else 22 - PosixTty, 21 + else => PosixTty, 23 22 }; 24 23 25 24 /// global tty instance, used in case of a panic. Not guaranteed to work if ··· 708 707 709 708 /// Initializes a TestTty. 710 709 pub fn init() !TestTty { 710 + if (builtin.os.tag == .windows) return error.SkipZigTest; 711 711 const list = try std.testing.allocator.create(std.ArrayList(u8)); 712 712 list.* = std.ArrayList(u8).init(std.testing.allocator); 713 713 const r, const w = try posix.pipe(); ··· 774 774 775 775 pub fn bufferedWriter(self: *const TestTty) std.io.BufferedWriter(4096, std.io.AnyWriter) { 776 776 return std.io.bufferedWriter(self.anyWriter()); 777 + } 778 + 779 + /// Implemented for the Windows API 780 + pub fn nextEvent(_: *Tty, _: *Parser, _: ?std.mem.Allocator) !Event { 781 + return error.SkipZigTest; 777 782 } 778 783 };