Closed
Description
Background: I'm improving fish's dynamic shell completions for cargo
to do things like have cargo run --bin <TAB>
give you a list of available binaries to choose from for tab completion.
It seems that cargo's dynamic test discovery is broken (or never implemented?).
e.g. while cargo bench --bench
returns a list of all benchmarks along with the error message:
$ cargo bench --bench
error: "--bench" takes one argument.
Available benches:
bench
cargo test --test
always returns "no tests available" incorrectly:
$ cargo test --test
error: "--test" takes one argument.
No tests available.
while actually running cargo test
shows that cargo has no problem enumerating tests:
mqudsi@ZBOOK /m/c/U/m/g/unquote> cargo test
Finished test [unoptimized + debuginfo] target(s) in 0.12s
Running target/debug/deps/unquote-d4809e2bcea39ff6
running 18 tests
... <SNIP>