mirror of
https://github.com/instructkr/claw-code.git
synced 2026-11-30 00:00:01 +08:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dad6b9780c |
@@ -400,7 +400,7 @@ mod tests {
|
|||||||
fn executes_simple_command() {
|
fn executes_simple_command() {
|
||||||
let output = execute_bash(BashCommandInput {
|
let output = execute_bash(BashCommandInput {
|
||||||
command: String::from("printf 'hello'"),
|
command: String::from("printf 'hello'"),
|
||||||
timeout: Some(1_000),
|
timeout: Some(30_000),
|
||||||
description: None,
|
description: None,
|
||||||
run_in_background: Some(false),
|
run_in_background: Some(false),
|
||||||
dangerously_disable_sandbox: Some(false),
|
dangerously_disable_sandbox: Some(false),
|
||||||
@@ -411,8 +411,12 @@ mod tests {
|
|||||||
})
|
})
|
||||||
.expect("bash command should execute");
|
.expect("bash command should execute");
|
||||||
|
|
||||||
|
assert!(
|
||||||
|
!output.interrupted,
|
||||||
|
"command was interrupted (timeout?); stderr: {}",
|
||||||
|
output.stderr
|
||||||
|
);
|
||||||
assert_eq!(output.stdout, "hello");
|
assert_eq!(output.stdout, "hello");
|
||||||
assert!(!output.interrupted);
|
|
||||||
assert!(output.sandbox_status.is_some());
|
assert!(output.sandbox_status.is_some());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -420,7 +424,7 @@ mod tests {
|
|||||||
fn disables_sandbox_when_requested() {
|
fn disables_sandbox_when_requested() {
|
||||||
let output = execute_bash(BashCommandInput {
|
let output = execute_bash(BashCommandInput {
|
||||||
command: String::from("printf 'hello'"),
|
command: String::from("printf 'hello'"),
|
||||||
timeout: Some(1_000),
|
timeout: Some(30_000),
|
||||||
description: None,
|
description: None,
|
||||||
run_in_background: Some(false),
|
run_in_background: Some(false),
|
||||||
dangerously_disable_sandbox: Some(true),
|
dangerously_disable_sandbox: Some(true),
|
||||||
@@ -463,7 +467,7 @@ mod tests {
|
|||||||
fn prevents_stdin_hangs_by_redirecting_to_null() {
|
fn prevents_stdin_hangs_by_redirecting_to_null() {
|
||||||
let output = execute_bash(BashCommandInput {
|
let output = execute_bash(BashCommandInput {
|
||||||
command: String::from("cat"),
|
command: String::from("cat"),
|
||||||
timeout: Some(2_000),
|
timeout: Some(30_000),
|
||||||
description: None,
|
description: None,
|
||||||
run_in_background: Some(false),
|
run_in_background: Some(false),
|
||||||
dangerously_disable_sandbox: Some(true),
|
dangerously_disable_sandbox: Some(true),
|
||||||
|
|||||||
Reference in new issue
Block a user