Auto merge of #5958 - mikerite:fix-fmt-20200825, r=flip1995

Various fmt test improvements

Various fmt test improvements.

changelog: none
This commit is contained in:
bors 2020-08-25 17:15:51 +00:00
commit f326668577
2 changed files with 4 additions and 7 deletions

View File

@ -1,6 +1,6 @@
[alias]
uitest = "test --test compile-test"
dev = "run --package clippy_dev --bin clippy_dev --manifest-path clippy_dev/Cargo.toml --"
dev = "run --target-dir clippy_dev/target --package clippy_dev --bin clippy_dev --manifest-path clippy_dev/Cargo.toml --"
[build]
rustflags = ["-Zunstable-options"]

View File

@ -7,7 +7,7 @@ fn fmt() {
return;
}
// Skip this test if rustup nightly is unavailable
// Skip this test if nightly rustfmt is unavailable
let rustup_output = Command::new("rustup")
.args(&["component", "list", "--toolchain", "nightly"])
.output()
@ -19,12 +19,9 @@ fn fmt() {
}
let root_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
let dev_dir = root_dir.join("clippy_dev");
let target_dir = root_dir.join("target");
let target_dir = target_dir.to_str().unwrap();
let output = Command::new("cargo")
.current_dir(dev_dir)
.args(&["+nightly", "run", "--target-dir", target_dir, "--", "fmt", "--check"])
.current_dir(root_dir)
.args(&["dev", "fmt", "--check"])
.output()
.unwrap();