pub struct Arguments {Show 16 fields
pub include_ignored: bool,
pub ignored: bool,
pub test: bool,
pub bench: bool,
pub list: bool,
pub nocapture: bool,
pub show_output: bool,
pub unstable_flags: Option<UnstableFlags>,
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)
show_output: bool
No-op, ignored. libtest-mimic does not currently capture stdout.
unstable_flags: Option<UnstableFlags>
No-op, ignored. Flag only exists for CLI compatibility with libtest.
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 Args for Arguments
impl Args for Arguments
source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command
so it can instantiate self
via
FromArgMatches::update_from_arg_matches_mut
Read moresource§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 parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Auto Trait Implementations§
impl Freeze for Arguments
impl RefUnwindSafe for Arguments
impl Send for Arguments
impl Sync for Arguments
impl Unpin for Arguments
impl UnwindSafe for Arguments
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)