diff options
Diffstat (limited to '')
| -rw-r--r-- | tests/tools.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/tools.rs b/tests/tools.rs index 4a8176e..0321bf8 100644 --- a/tests/tools.rs +++ b/tests/tools.rs | |||
| @@ -517,3 +517,16 @@ fn a_pipeline_that_exceeds_the_file_limit_is_reported() { | |||
| 517 | "should report the file limit: {text}" | 517 | "should report the file limit: {text}" |
| 518 | ); | 518 | ); |
| 519 | } | 519 | } |
| 520 | |||
| 521 | #[test] | ||
| 522 | fn bash_accepts_command_as_an_alias_for_cmd() { | ||
| 523 | use agent686::tools::validate; | ||
| 524 | |||
| 525 | assert!(validate("bash", &json!({ "command": "ls" })).is_ok()); | ||
| 526 | assert!(validate("bash", &json!({ "command": " " })).is_err()); | ||
| 527 | assert!(validate("bash", &json!({})).is_err()); | ||
| 528 | |||
| 529 | let text = run("bash", &json!({ "command": "echo alias-works" })).unwrap(); | ||
| 530 | assert!(text.contains("alias-works"), "{text}"); | ||
| 531 | assert!(text.contains("[exit 0]"), "{text}"); | ||
| 532 | } | ||
