rust-clippy/tests/dogfood.rs
Michael Wright 6fc9d90b60 Re-enable dogfood test on Windows
This should work now that dogfood uses a separate output directory.
2018-04-03 06:22:42 +02:00

24 lines
803 B
Rust

#[test]
fn dogfood() {
if option_env!("RUSTC_TEST_SUITE").is_some() {
return;
}
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"))
.env("CLIPPY_DOGFOOD", "true")
.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());
}
}