Files
metal2vulkan/crates
Anees Iqbal 824f34b68e Validation tests: command-replay refuses an option given twice, and compare-dumps an option it does not take (red)
command-replay's options() refuses an option a subcommand does not take
(62e9d045c3), but an option given twice still goes into its map in
silence, the last value winning: `play ... --until-frame 3 --until-frame
5` plays to frame 5. A script that splices options from its environment
after its own (`--until-frame X ${PLAY_ARGS}`) would play the splice's
value with nothing to say so. A repeated option should be a bad command
line instead.

replay_options::every_subcommand_refuses_an_option_given_twice runs each
of the six subcommands with one option given twice, required or not
(play --until-frame, dump --stream, shapes --blobs, snippet
video-surfaces --handle, compare-dumps --a, compare-plays --frame), and
expects exit status 2, a standard error line "--X is given twice", no
play report and no snippet written. Red here: dump, shapes and the
snippet run to exit 0, and play writes its report.

every_subcommand_refuses_an_option_it_does_not_take now runs
compare-dumps too (--frame), the one subcommand it left out. It passes
here, as the refusal is in place; its red is a negative control, the
fix's commit names it. The two tests share their setup and their checks.
2026-12-04 18:12:41 -08:00
..