Skip to content

Commit f326668

Browse files
committed
Auto merge of #5958 - mikerite:fix-fmt-20200825, r=flip1995
Various fmt test improvements Various fmt test improvements. changelog: none
2 parents f901559 + acc6b6c commit f326668

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

.cargo/config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[alias]
22
uitest = "test --test compile-test"
3-
dev = "run --package clippy_dev --bin clippy_dev --manifest-path clippy_dev/Cargo.toml --"
3+
dev = "run --target-dir clippy_dev/target --package clippy_dev --bin clippy_dev --manifest-path clippy_dev/Cargo.toml --"
44

55
[build]
66
rustflags = ["-Zunstable-options"]

tests/fmt.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ fn fmt() {
77
return;
88
}
99

10-
// Skip this test if rustup nightly is unavailable
10+
// Skip this test if nightly rustfmt is unavailable
1111
let rustup_output = Command::new("rustup")
1212
.args(&["component", "list", "--toolchain", "nightly"])
1313
.output()
@@ -19,12 +19,9 @@ fn fmt() {
1919
}
2020

2121
let root_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
22-
let dev_dir = root_dir.join("clippy_dev");
23-
let target_dir = root_dir.join("target");
24-
let target_dir = target_dir.to_str().unwrap();
2522
let output = Command::new("cargo")
26-
.current_dir(dev_dir)
27-
.args(&["+nightly", "run", "--target-dir", target_dir, "--", "fmt", "--check"])
23+
.current_dir(root_dir)
24+
.args(&["dev", "fmt", "--check"])
2825
.output()
2926
.unwrap();
3027

0 commit comments

Comments
 (0)