1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//! RFC 121 ยง2.5 (command-discovery-handoff-v1.md control 5): a static guard that every registry
//! entry actually has help text to route to. `main.rs::run`'s `--help`/`-h` routing prints
//! `command.help_lines` verbatim (`output::print_command_help`) -- it cannot detect an empty slice
//! at runtime and refuse, since an empty slice is a perfectly valid (if useless) value for the
//! field. This is the check that catches a future `Command` added to [`super::COMMANDS`] with
//! `help_lines: &[]`, so it fails a test rather than silently shipping a command whose `--help`
//! prints nothing.
//!
//! End-to-end routing itself (`prikk <command> --help` actually reaching this text, for a plain, a
//! multi-word, and a subcommand-dispatching command) is driven against the real binary in
//! `tests/rfc121_command_help.rs` -- this file only guards the data `COMMANDS` itself carries.
use COMMANDS;
/// At least one line per command must actually show `prikk <name>` usage, not only a wrapped
/// continuation or a `note:` aside -- so a command whose `help_lines` accidentally holds only
/// commentary (no usage line at all) is still caught, even though it is technically non-empty.