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

Function rejects_missing_or_empty_executable

src/cli/exec/mod.rs:206–215  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

204
205 #[test]
206 fn rejects_missing_or_empty_executable() {
207 // Empty vec (`exec: ""`), an empty first token (`codspeed exec ''` / `exec: "''"`),
208 // and a whitespace-only token (`codspeed exec " "`) are all invalid.
209 assert!(super::ensure_exec_commands_runnable(&[exec_target(&[], Some("a"))]).is_err());
210 assert!(super::ensure_exec_commands_runnable(&[exec_target(&[" "], Some("a"))]).is_err());
211 let err = super::ensure_exec_commands_runnable(&[exec_target(&[""], Some("bench"))])
212 .unwrap_err()
213 .to_string();
214 assert!(err.contains("bench"), "{err}");
215 }
216
217 #[test]
218 fn accepts_runnable_command_with_empty_argument() {

Callers

nothing calls this directly

Calls 2

exec_targetFunction · 0.85

Tested by

no test coverage detected