use std::process::Command;
const BIN: &str = env!("CARGO_BIN_EXE_pathlint");
#[test]
fn invalid_config_path_error_uses_canonical_flag_name() {
let out = Command::new(BIN)
.args([
"--config",
"/definitely/does/not/exist/pathlint.toml",
"check",
])
.output()
.expect("failed to run pathlint");
let stderr = String::from_utf8_lossy(&out.stderr);
assert!(
stderr.contains("--config"),
"stderr must mention --config: {stderr}"
);
assert!(
!stderr.contains("--rules"),
"stale --rules name leaked into error: {stderr}"
);
}