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

Function test_grep_invalid_regex

core/src/tools/builtin/grep.rs:198–209  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

196
197 #[tokio::test]
198 async fn test_grep_invalid_regex() {
199 let tool = GrepTool;
200 let ctx = ToolContext::new(PathBuf::from("/tmp"));
201
202 let result = tool
203 .execute(&serde_json::json!({"pattern": "[invalid"}), &ctx)
204 .await
205 .unwrap();
206
207 assert!(!result.success);
208 assert!(result.content.contains("Invalid regex"));
209 }
210
211 #[tokio::test]
212 async fn test_grep_missing_pattern() {

Callers

nothing calls this directly

Calls 1

executeMethod · 0.45

Tested by

no test coverage detected