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

Function test_path_with_alternative_field

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

Source from the content-addressed store, hash-verified

388
389 #[test]
390 fn test_path_with_alternative_field() {
391 // Test that "path" field also works (not just "file_path")
392 let matcher = HookMatcher::path("*.txt");
393
394 let event = make_pre_tool_event("s1", "Read", serde_json::json!({"path": "readme.txt"}));
395
396 assert!(matcher.matches(&event));
397 }
398
399 fn make_skill_load_event(skill_name: &str) -> HookEvent {
400 HookEvent::SkillLoad(crate::hooks::events::SkillLoadEvent {

Callers

nothing calls this directly

Calls 1

make_pre_tool_eventFunction · 0.70

Tested by

no test coverage detected