MCPcopy Create free account
hub / github.com/CodSpeedHQ/codspeed / test_wrap_and_build

Function test_wrap_and_build

src/executor/helpers/command.rs:182–191  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

180
181 #[test]
182 fn test_wrap_and_build() {
183 let mut builder = CommandBuilder::new("ls");
184 builder.arg("-la").wrap("sudo", ["-n"]);
185
186 let cmd = builder.build();
187 assert_eq!(cmd.get_program(), "sudo");
188
189 let args: Vec<_> = cmd.get_args().collect();
190 assert_eq!(args, vec!["-n", "ls", "-la"]);
191 }
192
193 #[test]
194 fn test_wrap_with_builder() {

Callers

nothing calls this directly

Calls 3

wrapMethod · 0.80
argMethod · 0.80
buildMethod · 0.80

Tested by

no test coverage detected