MCPcopy Index your code
hub / github.com/assert-rs/assert_cmd / arg

Method arg

src/cmd.rs:271–274  ·  view source on GitHub ↗

Adds an argument to pass to the program. Only one argument can be passed per use. So instead of: ```no_run # assert_cmd::Command::new("sh") .arg("-C /path/to/repo") # ; ``` usage would be: ```no_run # assert_cmd::Command::new("sh") .arg("-C") .arg("/path/to/repo") # ; ``` To pass multiple arguments see [`args`]. [`args`]: Command::args() # Examples Basic usage: ```no_run use assert_cmd::C

(&mut self, arg: S)

Source from the content-addressed store, hash-verified

269 /// .unwrap();
270 /// ```
271 pub fn arg<S: AsRef<ffi::OsStr>>(&mut self, arg: S) -> &mut Self {
272 self.cmd.arg(arg);
273 self
274 }
275
276 /// Adds multiple arguments to pass to the program.
277 ///

Callers 2

cargo_bin_cmdFunction · 0.80
lib_exampleFunction · 0.80

Calls

no outgoing calls

Tested by 1

lib_exampleFunction · 0.64