test: cover every shell in the finite-option-values assertion #227

Merged
natsukium merged 1 commit from issue-220 into main 2026-09-08 20:56:12 +09:00
Owner

docs/reference/cli.md states that --format and sessions capture --source complete to their listed values in every generated script, but the only test behind that sentence asserted three zsh literals against script(Shell::Zsh). The claim is true today in all three shells; the gap is that nothing outside zsh is exercised, so a later hide_possible_values or a bash/fish overlay that rewrites those specs would leave the doc false with the suite still green.

every_shell_script_offers_the_finite_option_values now loops the assertion over bash, zsh and fish, deriving each shell's own candidate spelling from the same value lists: bash's -W "human json", zsh's :FORMAT:(human json), and fish's newline-separated -a "human\t''...". The doc sentence and the test now cover the same three shells.

Test-only change: no behavior, docs, or wire surface moves, so no CHANGELOG entry.

Fixes #220

`docs/reference/cli.md` states that `--format` and `sessions capture --source` complete to their listed values in *every* generated script, but the only test behind that sentence asserted three zsh literals against `script(Shell::Zsh)`. The claim is true today in all three shells; the gap is that nothing outside zsh is exercised, so a later `hide_possible_values` or a bash/fish overlay that rewrites those specs would leave the doc false with the suite still green. `every_shell_script_offers_the_finite_option_values` now loops the assertion over bash, zsh and fish, deriving each shell's own candidate spelling from the same value lists: bash's `-W "human json"`, zsh's `:FORMAT:(human json)`, and fish's newline-separated `-a "human\t''..."`. The doc sentence and the test now cover the same three shells. Test-only change: no behavior, docs, or wire surface moves, so no CHANGELOG entry. Fixes #220
test: cover every shell in the finite-option-values assertion
All checks were successful
darwin / darwin docs-only no-op (pull_request) Has been skipped
darwin / build felis (aarch64-darwin) (pull_request) Successful in 50s
fuzz / cargo fuzz smoke (per target) (pull_request) Successful in 1m32s
pr / nix flake check (pull_request) Successful in 35s
pr / cargo build / clippy / test / deny (pull_request) Successful in 2m29s
pr / wire schema is compatible with the base (pull_request) Successful in 10s
pr / frontend smoke (x86_64-linux) (pull_request) Successful in 59s
pr / publish felis (x86_64-linux) (pull_request) Has been skipped
windows / detect relevant changes (pull_request) Successful in 3s
windows / windows docs-only no-op (pull_request) Has been skipped
windows / cargo nextest (Windows) (pull_request) Successful in 6m9s
windows / frontend smoke (Windows) (pull_request) Successful in 3m16s
windows / package felis (x86_64-pc-windows-msvc) (pull_request) Has been skipped
windows / cargo clippy (Windows cross) (pull_request) Successful in 14s
fuzz / cargo fuzz nightly long-run (push) Has been skipped
darwin / detect relevant changes (push) Successful in 3s
darwin / darwin docs-only no-op (push) Has been skipped
darwin / build felis (aarch64-darwin) (push) Successful in 14s
fuzz / cargo fuzz smoke (per target) (push) Successful in 1m5s
pr / nix flake check (push) Successful in 5s
pr / cargo build / clippy / test / deny (push) Successful in 1m47s
pr / wire schema is compatible with the base (push) Successful in 8s
pr / frontend smoke (x86_64-linux) (push) Successful in 6s
windows / detect relevant changes (push) Successful in 3s
windows / windows docs-only no-op (push) Has been skipped
windows / cargo nextest (Windows) (push) Successful in 4m34s
windows / frontend smoke (Windows) (push) Successful in 1m53s
pr / publish felis (x86_64-linux) (push) Successful in 11s
windows / package felis (x86_64-pc-windows-msvc) (push) Successful in 2m11s
windows / cargo clippy (Windows cross) (push) Successful in 13s
9b1cdb44e8
`docs/reference/cli.md` promises that `--format` and `sessions capture
--source` complete to their listed values in every generated script, but
only zsh was exercised. A later `hide_possible_values`, or a bash/fish
overlay that rewrites those specs, would falsify the sentence with the
suite still green. Loop the assertion over bash, zsh and fish with each
shell's own candidate spelling so the doc claim and the test cover the
same ground.

Assisted-by: Claude Code
natsukium deleted branch issue-220 2026-09-08 20:56:12 +09:00
Sign in to join this conversation.
No description provided.