feat: refactor sgclaw around zeroclaw compat runtime
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
mod common;
|
||||
|
||||
use std::path::PathBuf;
|
||||
use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
|
||||
@@ -82,3 +83,13 @@ fn browser_tool_rejects_action_when_mac_policy_blocks_it() {
|
||||
|
||||
assert!(err.to_string().contains("action is not allowed"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn default_rules_allow_zhihu_navigation() {
|
||||
let rules_path = PathBuf::from(env!("CARGO_MANIFEST_DIR"))
|
||||
.join("resources")
|
||||
.join("rules.json");
|
||||
let policy = MacPolicy::load_from_path(rules_path).unwrap();
|
||||
|
||||
policy.validate(&Action::Navigate, "www.zhihu.com").unwrap();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user