Struct libtest_mimic::Arguments
source · pub struct Arguments {Show 14 fields
pub include_ignored: bool,
pub ignored: bool,
pub test: bool,
pub bench: bool,
pub list: bool,
pub nocapture: bool,
pub exact: bool,
pub quiet: bool,
pub test_threads: Option<usize>,
pub logfile: Option<String>,
pub skip: Vec<String>,
pub color: Option<ColorSetting>,
pub format: Option<FormatSetting>,
pub filter: Option<String>,
}
Expand description
Command line arguments.
This type represents everything the user can specify via CLI args. The main
method is from_args
which reads the global
std::env::args()
and parses them into this type.
libtest-mimic
supports a subset of all args/flags supported by the
official test harness. There are also some other minor CLI differences, but
the main use cases should work exactly like with the built-in harness.
Fields§
§include_ignored: bool
Run ignored and non-ignored tests.
ignored: bool
Run only ignored tests.
test: bool
Run tests, but not benchmarks.
bench: bool
Run benchmarks, but not tests.
list: bool
Only list all tests and benchmarks.
nocapture: bool
No-op, ignored (libtest-mimic always runs in no-capture mode)
exact: bool
If set, filters are matched exactly rather than by substring.
quiet: bool
If set, display only one character per test instead of one line. Especially useful for huge test suites.
This is an alias for --format=terse
. If this is set, format
is
None
.
test_threads: Option<usize>
Number of threads used for parallel testing.
logfile: Option<String>
Path of the logfile. If specified, everything will be written into the file instead of stdout.
skip: Vec<String>
A list of filters. Tests whose names contain parts of any of these filters are skipped.
color: Option<ColorSetting>
Specifies whether or not to color the output.
format: Option<FormatSetting>
Specifies the format of the output.
filter: Option<String>
Filter string. Only tests which contain this string are run.
Implementations§
Trait Implementations§
source§impl CommandFactory for Arguments
impl CommandFactory for Arguments
source§impl FromArgMatches for Arguments
impl FromArgMatches for Arguments
source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches ) -> Result<Self, Error>
source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches ) -> Result<(), Error>
ArgMatches
to self
.source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches ) -> Result<(), Error>
ArgMatches
to self
.source§impl Parser for Arguments
impl Parser for Arguments
source§fn try_parse() -> Result<Self, Error<RichFormatter>>
fn try_parse() -> Result<Self, Error<RichFormatter>>
std::env::args_os()
, return Err on error.