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

Function test_session_matcher

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

Source from the content-addressed store, hash-verified

274
275 #[test]
276 fn test_session_matcher() {
277 let matcher = HookMatcher::session("session-1");
278
279 let s1_event = make_pre_tool_event("session-1", "Bash", serde_json::json!({}));
280 let s2_event = make_pre_tool_event("session-2", "Bash", serde_json::json!({}));
281
282 assert!(matcher.matches(&s1_event));
283 assert!(!matcher.matches(&s2_event));
284 }
285
286 #[test]
287 fn test_path_pattern_matcher() {

Callers

nothing calls this directly

Calls 1

make_pre_tool_eventFunction · 0.70

Tested by

no test coverage detected