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:
parent
cb16439e85
commit
9b749945bb
1 changed files with 11 additions and 0 deletions
11
std/wasi/testdata/std_fs_hard_link.rs
vendored
Normal file
11
std/wasi/testdata/std_fs_hard_link.rs
vendored
Normal 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()
|
||||
);
|
||||
}
|
Loading…
Reference in a new issue