rustdoc icon indicating copy to clipboard operation
rustdoc copied to clipboard

Flag: test args

Open steveklabnik opened this issue 8 years ago • 4 comments

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?

steveklabnik avatar Aug 10 '17 17:08 steveklabnik

This seems quite important.

steveklabnik avatar Aug 10 '17 17:08 steveklabnik

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.

hjr3 avatar Dec 03 '17 06:12 hjr3

Current list of test-args: https://github.com/rust-lang/rust/blob/717ac960b51a5a2bbedf0e4da899aec7ab2ab7ee/src/libtest/lib.rs#L353

hjr3 avatar Dec 03 '17 06:12 hjr3

Reading through #190, we may not need this flag. Need to find out if we plan to have rustdoc tests be actual tests.

hjr3 avatar Dec 05 '17 15:12 hjr3