]>
Commit | Line | Data |
---|---|---|
1 | #[test] | |
2 | fn dogfood() { | |
3 | if option_env!("RUSTC_TEST_SUITE").is_some() { | |
4 | return; | |
5 | } | |
6 | let root_dir = std::env::current_dir().unwrap(); | |
7 | for d in &[".", "clippy_lints"] { | |
8 | std::env::set_current_dir(root_dir.join(d)).unwrap(); | |
9 | let output = std::process::Command::new("cargo") | |
10 | .arg("run") | |
11 | .arg("--bin") | |
12 | .arg("cargo-clippy") | |
13 | .arg("--manifest-path") | |
14 | .arg(root_dir.join("Cargo.toml")) | |
15 | .env("CLIPPY_DOGFOOD", "true") | |
16 | .output() | |
17 | .unwrap(); | |
18 | println!("status: {}", output.status); | |
19 | println!("stdout: {}", String::from_utf8_lossy(&output.stdout)); | |
20 | println!("stderr: {}", String::from_utf8_lossy(&output.stderr)); | |
21 | ||
22 | assert!(output.status.success()); | |
23 | } | |
24 | } |