()
| 285 | |
| 286 | #[test] |
| 287 | fn test_path_pattern_matcher() { |
| 288 | let matcher = HookMatcher::path("*.rs"); |
| 289 | |
| 290 | let rs_event = make_pre_tool_event( |
| 291 | "s1", |
| 292 | "Write", |
| 293 | serde_json::json!({"file_path": "src/main.rs"}), |
| 294 | ); |
| 295 | let py_event = make_pre_tool_event( |
| 296 | "s1", |
| 297 | "Write", |
| 298 | serde_json::json!({"file_path": "src/main.py"}), |
| 299 | ); |
| 300 | |
| 301 | assert!(matcher.matches(&rs_event)); |
| 302 | assert!(!matcher.matches(&py_event)); |
| 303 | } |
| 304 | |
| 305 | #[test] |
| 306 | fn test_path_pattern_double_star() { |
nothing calls this directly
no test coverage detected