()
| 998 | |
| 999 | #[test] |
| 1000 | fn test_parse_post_tool_with_output() { |
| 1001 | let hook = make_hook(); |
| 1002 | let input = br#"{ |
| 1003 | "conversation_id": "c1", |
| 1004 | "tool_name": "bash", |
| 1005 | "tool_output": "Hello world\n", |
| 1006 | "duration": 200 |
| 1007 | }"#; |
| 1008 | let event = hook.parse_event(HookType::PostToolUse, input).unwrap(); |
| 1009 | let raw = event.raw_json.unwrap(); |
| 1010 | assert_eq!(raw["tool_output"], "Hello world\n"); |
| 1011 | assert_eq!(raw["duration"], 200); |
| 1012 | } |
| 1013 | |
| 1014 | #[test] |
| 1015 | fn test_parse_post_tool_minimal() { |
nothing calls this directly
no test coverage detected