Fix test bug (again)

This commit is contained in:
Nick Cameron 2018-05-04 09:35:56 +12:00
parent a06caf6b17
commit b6cd17f28a

View File

@ -885,30 +885,28 @@ fn drop(&mut self) {
#[test]
fn verify_check_works() {
let file_name = "temp_check.rs";
let _temp_file = make_temp_file(file_name);
let temp_file = make_temp_file("temp_check.rs");
assert_cli::Assert::command(&[
"cargo",
"run",
"--bin=rustfmt",
"--",
"--write-mode=check",
file_name,
temp_file.path.to_str().unwrap(),
]).succeeds()
.unwrap();
}
#[test]
fn verify_diff_works() {
let file_name = "temp_diff.rs";
let _temp_file = make_temp_file(file_name);
let temp_file = make_temp_file("temp_diff.rs");
assert_cli::Assert::command(&[
"cargo",
"run",
"--bin=rustfmt",
"--",
"--write-mode=diff",
file_name,
temp_file.path.to_str().unwrap(),
]).succeeds()
.unwrap();
}