INNER CODE UNIT · Rust

policy_set_disabled

ouch-org/ouch · src/sandbox/mod.rs:155

    fn policy_set_disabled() {
        let mut policy = SandboxPolicy::new();
        policy.set_disabled(true);
        assert!(policy.disabled);
    }

    #[test]
    fn apply_returns_false_when_disabled() {
        let mut policy = SandboxPolicy::new();
        policy.set_disabled(true);
        assert!(!policy.apply());
    }

    #[test]
    fn canonicalize_existing_path_resolves() {
        let dir = tempfile::tempdir().unwrap();
        let canon = canonicalize_for_sandbox(dir.path());
        assert!(canon.is_absolute());

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…