Skip to content

Commit 805a0ae

Browse files
committed
Add more test cases for suspicious_command_arg_space.
1 parent 8f56767 commit 805a0ae

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
fn main() {
2-
std::process::Command::new("echo").arg("hello world").spawn().unwrap();
2+
// Things it should warn about:
33
std::process::Command::new("echo").arg("-n hello").spawn().unwrap();
44
std::process::Command::new("cat").arg("--number file").spawn().unwrap();
5+
6+
// Things it should not warn about:
7+
std::process::Command::new("echo").arg("hello world").spawn().unwrap();
8+
std::process::Command::new("a").arg("--fmt=%a %b %c").spawn().unwrap();
9+
std::process::Command::new("b").arg("-ldflags=-s -w").spawn().unwrap();
510
}

0 commit comments

Comments
 (0)