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

Function test_path_pattern_double_star

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

Source from the content-addressed store, hash-verified

304
305 #[test]
306 fn test_path_pattern_double_star() {
307 let matcher = HookMatcher::path("src/**/*.rs");
308
309 let nested_event = make_pre_tool_event(
310 "s1",
311 "Write",
312 serde_json::json!({"file_path": "src/deep/nested/file.rs"}),
313 );
314 let root_event = make_pre_tool_event(
315 "s1",
316 "Write",
317 serde_json::json!({"file_path": "src/file.rs"}),
318 );
319
320 assert!(matcher.matches(&nested_event));
321 assert!(matcher.matches(&root_event));
322 }
323
324 #[test]
325 fn test_command_pattern_matcher() {

Callers

nothing calls this directly

Calls 1

make_pre_tool_eventFunction · 0.70

Tested by

no test coverage detected