MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / test_from_config

Function test_from_config

crates/opencode-permission/src/ruleset.rs:310–321  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

308
309 #[test]
310 fn test_from_config() {
311 let mut config = HashMap::new();
312 config.insert(
313 "bash".to_string(),
314 ConfigValue::Action(PermissionAction::Allow),
315 );
316
317 let ruleset = from_config(&config);
318 assert_eq!(ruleset.len(), 1);
319 assert_eq!(ruleset[0].permission, "bash");
320 assert_eq!(ruleset[0].action, PermissionAction::Allow);
321 }
322
323 #[test]
324 fn test_wildcard_match() {

Callers

nothing calls this directly

Calls 2

newFunction · 0.85
from_configFunction · 0.85

Tested by

no test coverage detected