mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 11:44:28 +00:00
8ddcb81a15
fixes #2274
18 lines
648 B
Rust
18 lines
648 B
Rust
#[test]
|
|
fn dogfood() {
|
|
let root_dir = std::env::current_dir().unwrap();
|
|
for d in &[".", "clippy_lints"] {
|
|
std::env::set_current_dir(root_dir.join(d)).unwrap();
|
|
let output = std::process::Command::new("cargo")
|
|
.arg("run")
|
|
.arg("--bin").arg("cargo-clippy")
|
|
.arg("--manifest-path").arg(root_dir.join("Cargo.toml"))
|
|
.output().unwrap();
|
|
println!("status: {}", output.status);
|
|
println!("stdout: {}", String::from_utf8_lossy(&output.stdout));
|
|
println!("stderr: {}", String::from_utf8_lossy(&output.stderr));
|
|
|
|
assert!(output.status.success());
|
|
}
|
|
}
|