File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : zTUI Runtime Test on Real Windows
2+
3+ on :
4+ push :
5+ pull_request :
6+ workflow_dispatch :
7+
8+ jobs :
9+ windows-test :
10+ runs-on : windows-latest
11+ steps :
12+ - uses : actions/checkout@v4
13+
14+ - name : Setup Zig
15+ uses : mlugg/setup-zig@v1
16+ with :
17+ version : 0.14.1
18+
19+ - name : Run Simple zTUI Example (init + draw + inputInit + hearing)
20+ run : |
21+ zig run - <<EOF
22+ const std = @import("std");
23+ const ztui = @import("src/main.zig");
24+
25+ pub fn main() !void {
26+ var win = try ztui.tui().init(.{ .w = 50, .h = 15 }, std.heap.page_allocator);
27+ defer win.deinit();
28+
29+ try win.appendRow("zTUI runtime test on REAL Windows!", .{});
30+
31+ try win.appendProgressBar(60);
32+
33+ try win.inputInit(.{ .prompt = "Test input > " });
34+
35+ win.draw(); # отрисовка
36+
37+ var buff: [128]u8 = undefined;
38+ const input = win.hearing(&buff) catch |err| {
39+ std.debug.print("Input error (expected in CI, no keyboard): {}\n", .{err});
40+ return;
41+ };
42+
43+ try win.appendRow("You typed: {s}", .{input});
44+ win.draw();
45+ }
46+ EOF
You can’t perform that action at this time.
0 commit comments