()
| 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() { |
nothing calls this directly
no test coverage detected