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

Function test_tool_matcher

core/src/hooks/matcher.rs:265–273  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

263
264 #[test]
265 fn test_tool_matcher() {
266 let matcher = HookMatcher::tool("Bash");
267
268 let bash_event = make_pre_tool_event("s1", "Bash", serde_json::json!({}));
269 let read_event = make_pre_tool_event("s1", "Read", serde_json::json!({}));
270
271 assert!(matcher.matches(&bash_event));
272 assert!(!matcher.matches(&read_event));
273 }
274
275 #[test]
276 fn test_session_matcher() {

Callers

nothing calls this directly

Calls 1

make_pre_tool_eventFunction · 0.70

Tested by

no test coverage detected