INNER CODE UNIT · Rust

canonicalize_missing_path_falls_back_to_parent

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

    fn canonicalize_missing_path_falls_back_to_parent() {
        let dir = tempfile::tempdir().unwrap();
        let missing = dir.path().join("does-not-exist-yet.txt");
        let canon = canonicalize_for_sandbox(&missing);
        assert!(canon.is_absolute());
        assert_eq!(canon.file_name().unwrap(), "does-not-exist-yet.txt");
    }
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…