Skip to content

Commit 16c292d

Browse files
authored
Merge pull request #3249 from andjo403/assert_cli
remove deprecated dependency assert_cli
2 parents 66c98db + 653f3ae commit 16c292d

File tree

3 files changed

+7
-47
lines changed

3 files changed

+7
-47
lines changed

Cargo.lock

Lines changed: 0 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,4 @@ bytecount = "0.4"
6060
rustc-workspace-hack = "1.0.0"
6161

6262
[dev-dependencies]
63-
assert_cli = "0.6"
6463
lazy_static = "1.0.0"

src/test/mod.rs

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
extern crate assert_cli;
12-
1311
use std::collections::{HashMap, HashSet};
1412
use std::env;
1513
use std::fs;
@@ -295,7 +293,7 @@ fn stdin_disable_all_formatting_test() {
295293
_ => return, // these tests require nightly
296294
}
297295
let input = String::from("fn main() { println!(\"This should not be formatted.\"); }");
298-
let mut child = Command::new("./target/debug/rustfmt")
296+
let mut child = Command::new(rustfmt().to_str().unwrap())
299297
.stdin(Stdio::piped())
300298
.stdout(Stdio::piped())
301299
.arg("--config-path=./tests/config/disable_all_formatting.toml")
@@ -973,11 +971,10 @@ fn rustfmt() -> PathBuf {
973971
#[test]
974972
fn verify_check_works() {
975973
let temp_file = make_temp_file("temp_check.rs");
976-
assert_cli::Assert::command(&[
977-
rustfmt().to_str().unwrap(),
978-
"--check",
979-
temp_file.path.to_str().unwrap(),
980-
])
981-
.succeeds()
982-
.unwrap();
974+
975+
Command::new(rustfmt().to_str().unwrap())
976+
.arg("--check")
977+
.arg(temp_file.path.to_str().unwrap())
978+
.status()
979+
.expect("run with check option failed");
983980
}

0 commit comments

Comments
 (0)