()
| 474 | |
| 475 | #[test] |
| 476 | fn test_hook_matches_with_matcher() { |
| 477 | let hook = Hook::new("test-hook", HookEventType::PreToolUse) |
| 478 | .with_matcher(HookMatcher::tool("Bash")); |
| 479 | |
| 480 | let bash_event = make_pre_tool_event("s1", "Bash"); |
| 481 | let read_event = make_pre_tool_event("s1", "Read"); |
| 482 | |
| 483 | assert!(hook.matches(&bash_event)); |
| 484 | assert!(!hook.matches(&read_event)); |
| 485 | } |
| 486 | |
| 487 | #[test] |
| 488 | fn test_hook_result_constructors() { |
nothing calls this directly
no test coverage detected