yoctui-utils 0.1.315

Shared utility functions for Yoctui
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use super::*;

#[test]
fn path_entry_detection_includes_dangling_symbolic_links() {
    use std::os::unix::fs::symlink;

    let root = std::env::temp_dir().join(format!(
        "yoctui-utils-dangling-entry-{}",
        std::process::id()
    ));
    let _ = std::fs::remove_dir_all(&root);
    std::fs::create_dir_all(&root).unwrap();
    let link = root.join("output");
    symlink(root.join("missing"), &link).unwrap();
    assert!(path_entry_exists(&link).unwrap());
    std::fs::remove_dir_all(root).unwrap();
}