MCPcopy Create free account
hub / github.com/Work-Fisher/code-claw / executes_simple_command

Function executes_simple_command

claw-code/rust/crates/runtime/src/bash.rs:247–264  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

245
246 #[test]
247 fn executes_simple_command() {
248 let output = execute_bash(BashCommandInput {
249 command: String::from("printf 'hello'"),
250 timeout: Some(1_000),
251 description: None,
252 run_in_background: Some(false),
253 dangerously_disable_sandbox: Some(false),
254 namespace_restrictions: Some(false),
255 isolate_network: Some(false),
256 filesystem_mode: Some(FilesystemIsolationMode::WorkspaceOnly),
257 allowed_mounts: None,
258 })
259 .expect("bash command should execute");
260
261 assert_eq!(output.stdout, "hello");
262 assert!(!output.interrupted);
263 assert!(output.sandbox_status.is_some());
264 }
265
266 #[test]
267 fn disables_sandbox_when_requested() {

Callers

nothing calls this directly

Calls 2

execute_bashFunction · 0.85
expectMethod · 0.80

Tested by

no test coverage detected