1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-25 08:39:09 -05:00
denoland-deno/std/wasi/testdata/std_fs_hard_link.rs
2020-06-29 20:37:15 -04:00

11 lines
296 B
Rust

// { "preopens": { "/fixture": "fixture", "/scratch": "scratch" } }
fn main() {
assert!(
std::fs::hard_link("/fixture/file", "/scratch/hardlink_to_file").is_ok()
);
assert_eq!(
std::fs::read("/fixture/file").unwrap(),
std::fs::read("/scratch/hardlink_to_file").unwrap()
);
}