()
| 162 | |
| 163 | #[test] |
| 164 | fn test_policy_check_deny() { |
| 165 | let policy = PermissionPolicy::new().deny("Bash(rm -rf:*)"); |
| 166 | |
| 167 | let decision = policy.check("Bash", &json!({"command": "rm -rf /"})); |
| 168 | assert_eq!(decision, PermissionDecision::Deny); |
| 169 | } |
| 170 | |
| 171 | #[test] |
| 172 | fn test_policy_check_ask() { |