1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-26 16:09:27 -05:00

test(std/wasi): add hard-link test (#6571)

This commit is contained in:
Casper Beyer 2020-06-30 08:37:15 +08:00 committed by GitHub
parent cb16439e85
commit 9b749945bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

11
std/wasi/testdata/std_fs_hard_link.rs vendored Normal file
View file

@ -0,0 +1,11 @@
// { "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()
);
}