milestone 15: make a green run mean a real pass
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
|
||||
const std = @import("std");
|
||||
const docs = @import("docs_files");
|
||||
const cli = @import("cli.zig");
|
||||
const routes = @import("web/routes.zig");
|
||||
const model = @import("config/model.zig");
|
||||
|
||||
@@ -48,12 +49,11 @@ test "every settings key appears in docs/reference/configuration.md" {
|
||||
|
||||
test "every cli subcommand has its own reference heading in docs/reference/cli.md" {
|
||||
const gpa = std.testing.allocator;
|
||||
const subcommands = [_][]const u8{ "run", "check", "export", "import", "version", "help" };
|
||||
for (subcommands) |name| {
|
||||
for (cli.command_names) |entry| {
|
||||
// Anchors on the reference-section heading ("## `import FILE`" starts
|
||||
// with "## `import"), so prose mentions elsewhere cannot mask a removed
|
||||
// command section.
|
||||
const needle = try std.fmt.allocPrint(gpa, "## `{s}", .{name});
|
||||
const needle = try std.fmt.allocPrint(gpa, "## `{s}", .{entry.name});
|
||||
defer gpa.free(needle);
|
||||
if (std.mem.indexOf(u8, docs.reference_cli_md, needle) == null) {
|
||||
std.debug.print("subcommand heading missing from docs/reference/cli.md: {s}\n", .{needle});
|
||||
|
||||
Reference in New Issue
Block a user