2023-02-25 18:08:29 -06:00
|
|
|
fn main() {
|
|
|
|
// Things it should warn about:
|
|
|
|
std::process::Command::new("echo").arg("-n hello").spawn().unwrap();
|
2023-08-24 14:32:12 -05:00
|
|
|
//~^ ERROR: single argument that looks like it should be multiple arguments
|
|
|
|
//~| NOTE: `-D clippy::suspicious-command-arg-space` implied by `-D warnings`
|
2023-02-25 18:08:29 -06:00
|
|
|
std::process::Command::new("cat").arg("--number file").spawn().unwrap();
|
2023-08-24 14:32:12 -05:00
|
|
|
//~^ ERROR: single argument that looks like it should be multiple arguments
|
2023-02-25 18:08:29 -06:00
|
|
|
|
|
|
|
// 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();
|
|
|
|
}
|