summaryrefslogtreecommitdiff
path: root/src/main.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/main.zig b/src/main.zig
index 4a067406..48022db5 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -200,7 +200,7 @@ fn nativeMain(init: std.process.Init) !void {
}
}
}
- // Native shells opt into the user config; the sans-IO core and web keep
+ // Native shells opt into the user config; direct core callers and web keep
// Options' null default. Read it before entering either frontend so every
// builtin has run before that frontend can render its first frame.
const found = @import("user_config.zig").load(init.io, arena, init.environ_map);
@@ -232,14 +232,20 @@ fn parseCtrlKey(raw: []const u8) ?u21 {
}
// The shells are imported inside main(), which a test build never analyses —
-// so their inline tests need naming here to exist at all. gui.zig only
-// compiles when it IS the shell (it @cImports SDL), hence the comptime gate;
-// under -Dplatform=tty this block analyses to nothing. Naming a file gets THAT
-// file's tests and no further: fonts.zig is imported by gui.zig, builtins.zig
-// and the macOS host, and still needs its own line here.
+// so their inline tests need naming here to exist at all. Each shell only
+// compiles when selected (GUI @cImports SDL; TTY imports vaxis), hence the
+// comptime gates. Naming a file gets THAT file's tests and no further:
+// fonts.zig is imported by gui.zig, builtins.zig and the macOS host, and still
+// needs its own line here.
test {
_ = @import("user_config.zig");
_ = @import("allocators.zig");
+ if (comptime pardes.platform == .tty) {
+ _ = @import("tty/tty.zig");
+ // tty.zig calls the compositor only from its runtime loop, so merely
+ // naming the shell does not make Zig analyse the compositor's tests.
+ _ = @import("tty/panel_compositor.zig");
+ }
if (comptime pardes.platform == .gui) _ = @import("gui/gui.zig");
if (comptime pardes.font_picker) _ = @import("fonts.zig");
}