cli: assert --load-level stays out of run --help
CI / test (pull_request) Successful in 3m22s

Last item of issue #2 phase 4 (CLI & output): the per-command help
test now checks that the removed flag does not resurface in the
help text.
This commit is contained in:
Daniel Samson committed 2026-11-12 10:53:03 +00:00
1 parent 3a4c4fa326
commit 5ee6b6021c
1 file changed
+2
+2
View File
@@ -432,6 +432,8 @@ test "per-command help" {
const r = try runCaptured(arena.allocator(), &.{ "run", "--help" }, null); const r = try runCaptured(arena.allocator(), &.{ "run", "--help" }, null);
try std.testing.expectEqual(exit_ok, r.code); try std.testing.expectEqual(exit_ok, r.code);
try std.testing.expect(std.mem.indexOf(u8, r.out, "--tag") != null); try std.testing.expect(std.mem.indexOf(u8, r.out, "--tag") != null);
// issue #2 removed the load levels: the flag must not resurface in the help.
try std.testing.expect(std.mem.indexOf(u8, r.out, "load-level") == null);
const s = try runCaptured(arena.allocator(), &.{ "service", "--help" }, null); const s = try runCaptured(arena.allocator(), &.{ "service", "--help" }, null);
try std.testing.expect(std.mem.indexOf(u8, s.out, "restart") != null); try std.testing.expect(std.mem.indexOf(u8, s.out, "restart") != null);
} }