diff options
| author | t <t@tjp.lol> | 2026-11-24 22:30:27 -0700 |
|---|---|---|
| committer | t <t@tjp.lol> | 2026-11-24 22:45:56 -0700 |
| commit | 17e3a3589d8482f545bb5956a4f7ea01c646698f (patch) | |
| tree | a828c6dd2138e7cb9e4b1bfa810e89f50ab5eed9 /build.zig | |
| parent | 3594d230f5368d4200e590654aad040432bee82e (diff) | |
Expand writing app interface and add Markdown support
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 14 |
1 files changed, 5 insertions, 9 deletions
@@ -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); } |
