Test helpers for a CLI built with usage.
The parser's observable surface is what a command line parses to, what a user is shown when
it does not, and what a shell offers while one is being typed. All three are testable from
the static tables the derive already emits. [command!] covers the other half of a CLI test:
run the compiled binary and capture what its command handler writes.
What it is not is a second implementation of any of them. Every page here comes from
[usage_argv::help::page], the same function parse() renders a help request with, and
every failure from [usage_argv::render_failure_plain], the same renderer it prints with —
asked for plain text, so an assertion does not turn on whether stderr was a terminal. A
harness that renders its own approximation of a help page is a harness whose passing tests
mean nothing, so the rule is that nothing in this crate formats a page.
# use Spec;
#
Enable it as a dev-dependency feature of the facade:
[]
= { = "usage-rs", = "6", = ["test"] }