Skip to content

fixtures/emit has no --help, so its step language lives only in the source #304

Description

@vyncint

Todayfixtures/emit is the fixture almost every integration test drives, and it understands 27 steps (TEXT, NL, --csi, --sleep, --wait-for, --read-hex, …). Measured on 0.10.1: grep -n '"--help"' fixtures/emit/src/main.rs finds nothing, so running it with a typo just prints a usage error, and the only description of the step language is the //! header of fixtures/emit/src/main.rs.

Why it is worth fixing — every test author who adds a case reads that header. emit --help is the same text a keystroke away, and a fixture that can explain itself is easier to reach for than one you have to open a file to use.

Fix — in fixtures/emit/src/main.rs, handle -h/--help as the first argument: print the step language and exit 0. Keep the text in one const so the //! header and the flag cannot say different things — the header can reference it, or the const can be the single copy.

Done when

  • emit --help prints every step it accepts and exits 0.
  • An unknown step still fails the way it does now (exit non-zero, naming the step).
  • The help text and the module header are not two hand-maintained copies.

A good first contribution: one file, no architecture decisions. Start with
CONTRIBUTING.md
— §1 lists every gate you can run locally, and §3 asks that a change land
with a test. Commits are Conventional Commits and need git commit -s
(DCO). Happy to review a draft PR early.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions