mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-28 20:16:58 +03:00
Add more test cases for suspicious_command_arg_space.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user