mirror of
https://github.com/bootandy/dust.git
synced 2026-06-08 11:29:05 +03:00
tests: Update assert_cmd
Use new cargo_bin_cmd macro. Old way of building Commands is deprecated
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use assert_cmd::Command;
|
||||
use assert_cmd::{Command, cargo_bin_cmd};
|
||||
use std::ffi::OsStr;
|
||||
use std::process::Output;
|
||||
use std::sync::Once;
|
||||
@@ -61,11 +61,11 @@ fn initialize() {
|
||||
|
||||
fn run_cmd<T: AsRef<OsStr>>(command_args: &[T]) -> Output {
|
||||
initialize();
|
||||
let mut to_run = &mut Command::cargo_bin("dust").unwrap();
|
||||
let mut to_run = cargo_bin_cmd!("dust");
|
||||
// Hide progress bar
|
||||
to_run.arg("-P");
|
||||
for p in command_args {
|
||||
to_run = to_run.arg(p);
|
||||
to_run.arg(p);
|
||||
}
|
||||
to_run.unwrap()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user