Struct testcall::TestCall [−][src]
pub struct TestCall<'a> { /* fields omitted */ }
Expand description
A TestCall object binds a BinTest::Command to a single executable and environment and provides functions to call this multiple times.
Implementations
Creates a new testcall object for ‘name’ from the current crates executables.
Creates a new testcall object for an external command given by path.
Sets the current dir in which the next call shall execute
pub fn call_args_envs<IA, S, IE, K, V>(&self, args: IA, envs: IE) -> Output where
IA: IntoIterator<Item = S>,
S: AsRef<OsStr>,
IE: IntoIterator<Item = (K, V)>,
K: AsRef<OsStr>,
V: AsRef<OsStr>,
pub fn call_args_envs<IA, S, IE, K, V>(&self, args: IA, envs: IE) -> Output where
IA: IntoIterator<Item = S>,
S: AsRef<OsStr>,
IE: IntoIterator<Item = (K, V)>,
K: AsRef<OsStr>,
V: AsRef<OsStr>,
Calls the executable with the given arguments and environment.
args
can be NO_ARGS
or something iterateable that yields the arguments.
envs
can be NO_ENVS
or something iterateable that yields the key/value pairs.
When any envs are given then the environment is cleared first.
Returns a Output object for further investigation.
Calls the executable with the given arguments.
args
can be NO_ARGS
or something iterateable that yields the arguments.
Returns a Output object for further investigation.
Convinience method to call the executable with the given arguments.
args
is a single ‘&str’ split at ascii_whitespace. It is important to note that this
only works when the arguments themself do not contain whitespace characters (like
quoted strings “Hello World”). Returns a Output object for further investigation.
Calls the executable without arguments.
envs
can be NO_ENVS
or something iterateable that yields the key/value pairs.
When any envs are given then the environment is cleared first.
Returns a Output object for further investigation.
Calls the executable without arguments. Returns a Output object for further investigation.
pub fn spawn_args_envs<IA, S, IE, K, V>(&self, args: IA, envs: IE) -> TestChild where
IA: IntoIterator<Item = S>,
S: AsRef<OsStr>,
IE: IntoIterator<Item = (K, V)>,
K: AsRef<OsStr>,
V: AsRef<OsStr>,
pub fn spawn_args_envs<IA, S, IE, K, V>(&self, args: IA, envs: IE) -> TestChild where
IA: IntoIterator<Item = S>,
S: AsRef<OsStr>,
IE: IntoIterator<Item = (K, V)>,
K: AsRef<OsStr>,
V: AsRef<OsStr>,
Spawns executable with the given arguments and environment in the background.
args
can be NO_ARGS
or something iterateable that yields the arguments.
envs
can be NO_ENVS
or something iterateable that yields the key/value pairs.
When any envs are given then the environment is cleared first.
Stdout and stderr are rigged to be piped back to the caller to be collected by
The TestChild::wait().
Returns a TestChild object for later investigation.
pub fn spawn_args<IA, S>(&self, args: IA) -> TestChild where
IA: IntoIterator<Item = S>,
S: AsRef<OsStr>,
pub fn spawn_args<IA, S>(&self, args: IA) -> TestChild where
IA: IntoIterator<Item = S>,
S: AsRef<OsStr>,
Spawns the executable with the given arguments into background.
args
can be NO_ARGS
or something iterateable that yields the arguments.
Returns a TestChild object for later investigation.
pub fn spawn_envs<IE, K, V>(&self, envs: IE) -> TestChild where
IE: IntoIterator<Item = (K, V)>,
K: AsRef<OsStr>,
V: AsRef<OsStr>,
pub fn spawn_envs<IE, K, V>(&self, envs: IE) -> TestChild where
IE: IntoIterator<Item = (K, V)>,
K: AsRef<OsStr>,
V: AsRef<OsStr>,
Spawns the executable without arguments into background.
envs
can be NO_ENVS
or something iterateable that yields the key/value pairs.
When any envs are given then the environment is cleared first.
Returns a TestChild object for later investigation.