diff options
| -rw-r--r-- | tests/ui/suspicious_command_arg_space.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/ui/suspicious_command_arg_space.rs b/tests/ui/suspicious_command_arg_space.rs index 74b230f430b..bdc6113a250 100644 --- a/tests/ui/suspicious_command_arg_space.rs +++ b/tests/ui/suspicious_command_arg_space.rs @@ -1,5 +1,10 @@ fn main() { - std::process::Command::new("echo").arg("hello world").spawn().unwrap(); + // Things it should warn about: std::process::Command::new("echo").arg("-n hello").spawn().unwrap(); std::process::Command::new("cat").arg("--number file").spawn().unwrap(); + + // 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(); } |
