Add theme customizer.
This commit is contained in:
@@ -85,6 +85,36 @@ pub fn build(b: *std.Build) void {
|
||||
const test_step = b.step("test", "Run the tests");
|
||||
test_step.dependOn(&b.addRunArtifact(tests).step);
|
||||
|
||||
// The palette is the third root: a table of colours, the rules for
|
||||
// resolving one, and the CSS it is written out as. It reaches libghostty-vt
|
||||
// for the terminal's own default palette and nothing else, so it tests
|
||||
// without a display in the same way the two above do.
|
||||
const palette_tests = b.addTest(.{
|
||||
.root_module = b.createModule(.{
|
||||
.root_source_file = b.path("src/palette.zig"),
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
}),
|
||||
});
|
||||
palette_tests.root_module.addImport("ghostty-vt", ghostty.module("ghostty-vt"));
|
||||
test_step.dependOn(&b.addRunArtifact(palette_tests).step);
|
||||
|
||||
// And a root for the settings file itself. `Settings.zig` reaches GLib for
|
||||
// where the file lives, but reading and writing its *contents* is pure
|
||||
// enough to test — which is what these cover, since the palette overrides
|
||||
// are a nested object whose shape one launch has to agree with the next on.
|
||||
const settings_tests = b.addTest(.{
|
||||
.root_module = b.createModule(.{
|
||||
.root_source_file = b.path("src/Settings.zig"),
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
.link_libc = true,
|
||||
}),
|
||||
});
|
||||
settings_tests.root_module.addImport("glib", gobject.module("glib2"));
|
||||
settings_tests.root_module.addImport("ghostty-vt", ghostty.module("ghostty-vt"));
|
||||
test_step.dependOn(&b.addRunArtifact(settings_tests).step);
|
||||
|
||||
// A second root for the same reason, one step further out: `emoji.zig` is a
|
||||
// table and a search over it, and it imports nothing at all. It cannot hang
|
||||
// off the root above because a test binary has exactly one root, and
|
||||
|
||||
Reference in New Issue
Block a user