Skip to content

Commit f9ba89b

Browse files
committed
Add Execs::args
This adds the `Execs::args` method which forwards to `ProcessBuilder::args` to specify multiple command arguments at once.
1 parent 7e5ab66 commit f9ba89b

File tree

1 file changed

+7
-0
lines changed
  • crates/cargo-test-support/src

1 file changed

+7
-0
lines changed

crates/cargo-test-support/src/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,13 @@ impl Execs {
764764
self
765765
}
766766

767+
pub fn args<T: AsRef<OsStr>>(&mut self, args: &[T]) -> &mut Self {
768+
if let Some(ref mut p) = self.process_builder {
769+
p.args(args);
770+
}
771+
self
772+
}
773+
767774
pub fn cwd<T: AsRef<OsStr>>(&mut self, path: T) -> &mut Self {
768775
if let Some(ref mut p) = self.process_builder {
769776
if let Some(cwd) = p.get_cwd() {

0 commit comments

Comments
 (0)