| 653 | |
| 654 | #[tokio::test] |
| 655 | async fn program_tool_rejects_unsupported_language() { |
| 656 | let tool = ProgramTool::new(Arc::new(ToolRegistry::new(PathBuf::from("/tmp")))); |
| 657 | let output = tool |
| 658 | .execute( |
| 659 | &serde_json::json!({ |
| 660 | "type": "script", |
| 661 | "language": "typescript", |
| 662 | "source": "async function run() { return {}; }" |
| 663 | }), |
| 664 | &ToolContext::new(PathBuf::from("/tmp")), |
| 665 | ) |
| 666 | .await |
| 667 | .unwrap(); |
| 668 | |
| 669 | assert!(!output.success); |
| 670 | assert!(output.content.contains("Unsupported script language")); |
| 671 | } |
| 672 | |
| 673 | #[tokio::test] |
| 674 | async fn program_tool_rejects_unsupported_script_path() { |