blob: 5d7b1e0c17f2568271e2248d9f4eacf1839161b6 [file] [log] [blame]
fn main() {
// Things it should warn about:
std::process::Command::new("echo").args(["-n", "hello"]).spawn().unwrap();
//~^ ERROR: single argument that looks like it should be multiple arguments
//~| NOTE: `-D clippy::suspicious-command-arg-space` implied by `-D warnings`
std::process::Command::new("cat").args(["--number", "file"]).spawn().unwrap();
//~^ ERROR: single argument that looks like it should be multiple arguments
// Things it should not warn about:
std::process::Command::new("echo").arg("hello world").spawn().unwrap();
std::process::Command::new("a").arg("--fmt=%a %b %c").spawn().unwrap();
std::process::Command::new("b").arg("-ldflags=-s -w").spawn().unwrap();
}