MCPcopy Create free account
hub / github.com/AI45Lab/Code / program_tool_rejects_unsupported_language

Function program_tool_rejects_unsupported_language

core/src/tools/program_tool.rs:655–671  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls 1

executeMethod · 0.45

Tested by

no test coverage detected