rustdoc
rustdoc copied to clipboard
Flag: test args
This issue is part of https://github.com/steveklabnik/rustdoc/issues/125
--test-args:
Using this flag looks like this:
$ rustdoc src/lib.rs --test --test-args ignored
This flag will pass options to the test runner when running documentation tests. For more, see the chapter on documentation tests.
See also --test.
Should we keep this flag or not?
This seems quite important.
I was looking at starting to implement this and I am not sure we need this flag. The existing rustdoc would do something like $ rustdoc x.rs --test --test-args --color=never which made sense because --test was a distinct from --test-args. In this rustdoc, test is a subcommand. It seems better to implement $ rustdoc test --color=never instead of requiring $ rustdoc test --test-args --color=never.
Current list of test-args: https://github.com/rust-lang/rust/blob/717ac960b51a5a2bbedf0e4da899aec7ab2ab7ee/src/libtest/lib.rs#L353
Reading through #190, we may not need this flag. Need to find out if we plan to have rustdoc tests be actual tests.