From 17e3a3589d8482f545bb5956a4f7ea01c646698f Mon Sep 17 00:00:00 2001 From: t Date: Tue, 24 Nov 2026 22:30:27 -0700 Subject: Expand writing app interface and add Markdown support --- build.zig | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'build.zig') diff --git a/build.zig b/build.zig index 2fe0069..0c52f42 100644 --- a/build.zig +++ b/build.zig @@ -25,17 +25,13 @@ pub fn build(b: *std.Build) void { if (b.args) |args| run.addArgs(args); b.step("run", "Run the editor (zig build run -- file.md)").dependOn(&run.step); - // The checks: the document model on its own, then the real app driven through its - // commands with no window shown. - const unit = b.addTest(.{ .root_module = b.createModule(.{ - .root_source_file = b.path("src/doc.zig"), - .target = target, - }) }); + // Format/model checks plus the real app driven through its commands with no window shown. const smoke = b.addRunArtifact(exe); smoke.setEnvironmentVariable("WRITE_AWAY_SELFTEST", "1"); const test_step = b.step("test", "Run the checks"); - const lab_tests = b.addTest(.{ .root_module = b.createModule(.{ .root_source_file = b.path("src/lab.zig"), .target = target }) }); - test_step.dependOn(&b.addRunArtifact(lab_tests).step); - test_step.dependOn(&b.addRunArtifact(unit).step); + for ([_][]const u8{ "src/doc.zig", "src/markdown.zig", "src/lab.zig", "src/lab_ui.zig" }) |path| { + const unit = b.addTest(.{ .root_module = b.createModule(.{ .root_source_file = b.path(path), .target = target }) }); + test_step.dependOn(&b.addRunArtifact(unit).step); + } test_step.dependOn(&smoke.step); } -- cgit v1.3